From fc365d56ed1673862b1338e575d9e5a77d0dc4bd Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 25 Feb 2021 15:12:05 -0800 Subject: [PATCH 1/3] feat: add v1beta client --- .../clirr-ignored-differences.xml | 15 - .../data/v1beta/BetaAnalyticsDataClient.java | 753 ++ .../v1beta/BetaAnalyticsDataSettings.java | 245 + .../analytics/data/v1beta/gapic_metadata.json | 36 + .../analytics/data/v1beta/package-info.java | 49 + .../v1beta/stub/BetaAnalyticsDataStub.java | 80 + .../stub/BetaAnalyticsDataStubSettings.java | 487 ++ .../GrpcBetaAnalyticsDataCallableFactory.java | 115 + .../stub/GrpcBetaAnalyticsDataStub.java | 359 + .../v1beta/BetaAnalyticsDataClientTest.java | 502 ++ .../data/v1beta/MockBetaAnalyticsData.java | 59 + .../v1beta/MockBetaAnalyticsDataImpl.java | 187 + .../clirr-ignored-differences.xml | 15 - .../data/v1beta/BetaAnalyticsDataGrpc.java | 1052 +++ .../data/v1beta/AnalyticsDataApiProto.java | 407 ++ .../v1beta/BatchRunPivotReportsRequest.java | 1219 ++++ .../BatchRunPivotReportsRequestOrBuilder.java | 121 + .../v1beta/BatchRunPivotReportsResponse.java | 974 +++ ...BatchRunPivotReportsResponseOrBuilder.java | 78 + .../data/v1beta/BatchRunReportsRequest.java | 1208 ++++ .../BatchRunReportsRequestOrBuilder.java | 121 + .../data/v1beta/BatchRunReportsResponse.java | 957 +++ .../BatchRunReportsResponseOrBuilder.java | 77 + .../google/analytics/data/v1beta/Cohort.java | 1278 ++++ .../data/v1beta/CohortOrBuilder.java | 157 + .../data/v1beta/CohortReportSettings.java | 551 ++ .../v1beta/CohortReportSettingsOrBuilder.java | 39 + .../analytics/data/v1beta/CohortSpec.java | 1592 +++++ .../data/v1beta/CohortSpecOrBuilder.java | 160 + .../analytics/data/v1beta/CohortsRange.java | 1058 +++ .../data/v1beta/CohortsRangeOrBuilder.java | 95 + .../analytics/data/v1beta/DateRange.java | 1057 +++ .../data/v1beta/DateRangeOrBuilder.java | 118 + .../analytics/data/v1beta/Dimension.java | 999 +++ .../data/v1beta/DimensionExpression.java | 3318 +++++++++ .../v1beta/DimensionExpressionOrBuilder.java | 142 + .../data/v1beta/DimensionHeader.java | 641 ++ .../data/v1beta/DimensionHeaderOrBuilder.java | 50 + .../data/v1beta/DimensionMetadata.java | 1417 ++++ .../v1beta/DimensionMetadataOrBuilder.java | 180 + .../data/v1beta/DimensionOrBuilder.java | 106 + .../analytics/data/v1beta/DimensionValue.java | 736 ++ .../data/v1beta/DimensionValueOrBuilder.java | 52 + .../google/analytics/data/v1beta/Filter.java | 6293 +++++++++++++++++ .../data/v1beta/FilterExpression.java | 1786 +++++ .../data/v1beta/FilterExpressionList.java | 962 +++ .../v1beta/FilterExpressionListOrBuilder.java | 77 + .../v1beta/FilterExpressionOrBuilder.java | 173 + .../data/v1beta/FilterOrBuilder.java | 194 + .../data/v1beta/GetMetadataRequest.java | 706 ++ .../v1beta/GetMetadataRequestOrBuilder.java | 70 + .../analytics/data/v1beta/Metadata.java | 1628 +++++ .../analytics/data/v1beta/MetadataName.java | 168 + .../data/v1beta/MetadataOrBuilder.java | 154 + .../google/analytics/data/v1beta/Metric.java | 984 +++ .../data/v1beta/MetricAggregation.java | 222 + .../analytics/data/v1beta/MetricHeader.java | 790 +++ .../data/v1beta/MetricHeaderOrBuilder.java | 75 + .../analytics/data/v1beta/MetricMetadata.java | 1759 +++++ .../data/v1beta/MetricMetadataOrBuilder.java | 234 + .../data/v1beta/MetricOrBuilder.java | 110 + .../analytics/data/v1beta/MetricType.java | 396 ++ .../analytics/data/v1beta/MetricValue.java | 735 ++ .../data/v1beta/MetricValueOrBuilder.java | 52 + .../analytics/data/v1beta/NumericValue.java | 745 ++ .../data/v1beta/NumericValueOrBuilder.java | 53 + .../google/analytics/data/v1beta/OrderBy.java | 5533 +++++++++++++++ .../data/v1beta/OrderByOrBuilder.java | 145 + .../google/analytics/data/v1beta/Pivot.java | 1978 ++++++ .../data/v1beta/PivotDimensionHeader.java | 964 +++ .../v1beta/PivotDimensionHeaderOrBuilder.java | 77 + .../analytics/data/v1beta/PivotHeader.java | 1134 +++ .../data/v1beta/PivotHeaderOrBuilder.java | 104 + .../analytics/data/v1beta/PivotOrBuilder.java | 259 + .../analytics/data/v1beta/PropertyQuota.java | 1686 +++++ .../data/v1beta/PropertyQuotaOrBuilder.java | 189 + .../analytics/data/v1beta/QuotaStatus.java | 634 ++ .../data/v1beta/QuotaStatusOrBuilder.java | 51 + .../data/v1beta/ReportingApiProto.java | 640 ++ .../data/v1beta/ResponseMetaData.java | 550 ++ .../v1beta/ResponseMetaDataOrBuilder.java | 39 + .../com/google/analytics/data/v1beta/Row.java | 1538 ++++ .../analytics/data/v1beta/RowOrBuilder.java | 134 + .../data/v1beta/RunPivotReportRequest.java | 4127 +++++++++++ .../RunPivotReportRequestOrBuilder.java | 493 ++ .../data/v1beta/RunPivotReportResponse.java | 4336 ++++++++++++ .../RunPivotReportResponseOrBuilder.java | 539 ++ .../data/v1beta/RunRealtimeReportRequest.java | 3372 +++++++++ .../RunRealtimeReportRequestOrBuilder.java | 397 ++ .../v1beta/RunRealtimeReportResponse.java | 3839 ++++++++++ .../RunRealtimeReportResponseOrBuilder.java | 397 ++ .../data/v1beta/RunReportRequest.java | 4768 +++++++++++++ .../v1beta/RunReportRequestOrBuilder.java | 592 ++ .../data/v1beta/RunReportResponse.java | 4332 ++++++++++++ .../v1beta/RunReportResponseOrBuilder.java | 467 ++ .../data/v1beta/analytics_data_api.proto | 534 ++ .../google/analytics/data/v1beta/data.proto | 793 +++ 97 files changed, 85839 insertions(+), 30 deletions(-) delete mode 100644 google-analytics-data/clirr-ignored-differences.xml create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/gapic_metadata.json create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/package-info.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStub.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataCallableFactory.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataStub.java create mode 100644 google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientTest.java create mode 100644 google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsData.java create mode 100644 google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsDataImpl.java delete mode 100644 grpc-google-analytics-data-v1alpha/clirr-ignored-differences.xml create mode 100644 grpc-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataGrpc.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/AnalyticsDataApiProto.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponse.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponseOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponse.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponseOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Cohort.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettings.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettingsOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpec.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpecOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRange.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRangeOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRange.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRangeOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Dimension.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpression.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpressionOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeader.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeaderOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadata.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadataOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValue.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValueOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Filter.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpression.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionList.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionListOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metadata.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataName.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metric.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricAggregation.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeader.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeaderOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadata.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadataOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricType.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValue.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValueOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValue.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValueOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderBy.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderByOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Pivot.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeader.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeaderOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeader.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeaderOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuota.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuotaOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatus.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatusOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ReportingApiProto.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaData.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaDataOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Row.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RowOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponse.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponseOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponse.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponseOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequest.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequestOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponse.java create mode 100644 proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponseOrBuilder.java create mode 100644 proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/analytics_data_api.proto create mode 100644 proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/data.proto diff --git a/google-analytics-data/clirr-ignored-differences.xml b/google-analytics-data/clirr-ignored-differences.xml deleted file mode 100644 index ea928f80..00000000 --- a/google-analytics-data/clirr-ignored-differences.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - 7002 - com/google/analytics/data/v1alpha/AlphaAnalyticsData* - * getUniversalMetadata*(*) - - - 7002 - com/google/analytics/data/v1alpha/stub/*AlphaAnalyticsData* - * getUniversalMetadata*(*) - - diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java new file mode 100644 index 00000000..d3322622 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java @@ -0,0 +1,753 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import com.google.analytics.data.v1beta.stub.BetaAnalyticsDataStub; +import com.google.analytics.data.v1beta.stub.BetaAnalyticsDataStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Google Analytics reporting data service. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+ *   RunPivotReportRequest request =
+ *       RunPivotReportRequest.newBuilder()
+ *           .setProperty("property-993141291")
+ *           .addAllDimensions(new ArrayList())
+ *           .addAllMetrics(new ArrayList())
+ *           .addAllDateRanges(new ArrayList())
+ *           .addAllPivots(new ArrayList())
+ *           .setDimensionFilter(FilterExpression.newBuilder().build())
+ *           .setMetricFilter(FilterExpression.newBuilder().build())
+ *           .setCurrencyCode("currencyCode1004773790")
+ *           .setCohortSpec(CohortSpec.newBuilder().build())
+ *           .setKeepEmptyRows(true)
+ *           .setReturnPropertyQuota(true)
+ *           .build();
+ *   RunPivotReportResponse response = betaAnalyticsDataClient.runPivotReport(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the BetaAnalyticsDataClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of BetaAnalyticsDataSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * BetaAnalyticsDataSettings betaAnalyticsDataSettings =
+ *     BetaAnalyticsDataSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BetaAnalyticsDataClient betaAnalyticsDataClient =
+ *     BetaAnalyticsDataClient.create(betaAnalyticsDataSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * BetaAnalyticsDataSettings betaAnalyticsDataSettings =
+ *     BetaAnalyticsDataSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BetaAnalyticsDataClient betaAnalyticsDataClient =
+ *     BetaAnalyticsDataClient.create(betaAnalyticsDataSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class BetaAnalyticsDataClient implements BackgroundResource { + private final BetaAnalyticsDataSettings settings; + private final BetaAnalyticsDataStub stub; + + /** Constructs an instance of BetaAnalyticsDataClient with default settings. */ + public static final BetaAnalyticsDataClient create() throws IOException { + return create(BetaAnalyticsDataSettings.newBuilder().build()); + } + + /** + * Constructs an instance of BetaAnalyticsDataClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final BetaAnalyticsDataClient create(BetaAnalyticsDataSettings settings) + throws IOException { + return new BetaAnalyticsDataClient(settings); + } + + /** + * Constructs an instance of BetaAnalyticsDataClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(BetaAnalyticsDataSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final BetaAnalyticsDataClient create(BetaAnalyticsDataStub stub) { + return new BetaAnalyticsDataClient(stub); + } + + /** + * Constructs an instance of BetaAnalyticsDataClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected BetaAnalyticsDataClient(BetaAnalyticsDataSettings settings) throws IOException { + this.settings = settings; + this.stub = ((BetaAnalyticsDataStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected BetaAnalyticsDataClient(BetaAnalyticsDataStub stub) { + this.settings = null; + this.stub = stub; + } + + public final BetaAnalyticsDataSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public BetaAnalyticsDataStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a customized report of your Google Analytics event data. Reports contain statistics + * derived from data collected by the Google Analytics tracking code. The data returned from the + * API is as a table with columns for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or event count. Dimensions + * break down metrics across some common criteria, such as country or event name. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunReportRequest request =
+   *       RunReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .addAllDateRanges(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllMetricAggregations(new ArrayList())
+   *           .addAllOrderBys(new ArrayList())
+   *           .setCurrencyCode("currencyCode1004773790")
+   *           .setCohortSpec(CohortSpec.newBuilder().build())
+   *           .setKeepEmptyRows(true)
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   for (DimensionHeader element : betaAnalyticsDataClient.runReport(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RunReportPagedResponse runReport(RunReportRequest request) { + return runReportPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a customized report of your Google Analytics event data. Reports contain statistics + * derived from data collected by the Google Analytics tracking code. The data returned from the + * API is as a table with columns for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or event count. Dimensions + * break down metrics across some common criteria, such as country or event name. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunReportRequest request =
+   *       RunReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .addAllDateRanges(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .addAllMetricAggregations(new ArrayList())
+   *           .addAllOrderBys(new ArrayList())
+   *           .setCurrencyCode("currencyCode1004773790")
+   *           .setCohortSpec(CohortSpec.newBuilder().build())
+   *           .setKeepEmptyRows(true)
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.runReportPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DimensionHeader element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable runReportPagedCallable() { + return stub.runReportPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a customized report of your Google Analytics event data. Reports contain statistics + * derived from data collected by the Google Analytics tracking code. The data returned from the + * API is as a table with columns for the requested dimensions and metrics. Metrics are individual + * measurements of user activity on your property, such as active users or event count. Dimensions + * break down metrics across some common criteria, such as country or event name. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   while (true) {
+   *     RunReportResponse response = betaAnalyticsDataClient.runReportCallable().call(request);
+   *     for (DimensionHeader element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable runReportCallable() { + return stub.runReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a customized pivot report of your Google Analytics event data. Pivot reports are more + * advanced and expressive formats than regular reports. In a pivot report, dimensions are only + * visible if they are included in a pivot. Multiple pivots can be specified to further dissect + * your data. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunPivotReportRequest request =
+   *       RunPivotReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .addAllDateRanges(new ArrayList())
+   *           .addAllPivots(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setCurrencyCode("currencyCode1004773790")
+   *           .setCohortSpec(CohortSpec.newBuilder().build())
+   *           .setKeepEmptyRows(true)
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   RunPivotReportResponse response = betaAnalyticsDataClient.runPivotReport(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RunPivotReportResponse runPivotReport(RunPivotReportRequest request) { + return runPivotReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a customized pivot report of your Google Analytics event data. Pivot reports are more + * advanced and expressive formats than regular reports. In a pivot report, dimensions are only + * visible if they are included in a pivot. Multiple pivots can be specified to further dissect + * your data. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunPivotReportRequest request =
+   *       RunPivotReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .addAllDateRanges(new ArrayList())
+   *           .addAllPivots(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setCurrencyCode("currencyCode1004773790")
+   *           .setCohortSpec(CohortSpec.newBuilder().build())
+   *           .setKeepEmptyRows(true)
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.runPivotReportCallable().futureCall(request);
+   *   // Do something.
+   *   RunPivotReportResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + runPivotReportCallable() { + return stub.runPivotReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns multiple reports in a batch. All reports must be for the same GA4 Property. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   BatchRunReportsRequest request =
+   *       BatchRunReportsRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchRunReportsResponse response = betaAnalyticsDataClient.batchRunReports(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchRunReportsResponse batchRunReports(BatchRunReportsRequest request) { + return batchRunReportsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns multiple reports in a batch. All reports must be for the same GA4 Property. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   BatchRunReportsRequest request =
+   *       BatchRunReportsRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.batchRunReportsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRunReportsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchRunReportsCallable() { + return stub.batchRunReportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   BatchRunPivotReportsRequest request =
+   *       BatchRunPivotReportsRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchRunPivotReportsResponse response = betaAnalyticsDataClient.batchRunPivotReports(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final BatchRunPivotReportsResponse batchRunPivotReports( + BatchRunPivotReportsRequest request) { + return batchRunPivotReportsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   BatchRunPivotReportsRequest request =
+   *       BatchRunPivotReportsRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.batchRunPivotReportsCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRunPivotReportsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + batchRunPivotReportsCallable() { + return stub.batchRunPivotReportsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the + * dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified + * in the request, and the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + *

For example if a custom metric with parameter name `levels_unlocked` is registered to a + * property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata + * are dimensions and metrics applicable to any property such as `country` and `totalUsers`. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   MetadataName name = MetadataName.of("[PROPERTY]");
+   *   Metadata response = betaAnalyticsDataClient.getMetadata(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric Google Analytics + * GA4 Property identifier. To learn more, see [where to find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + *

Example: properties/1234/metadata + *

Set the Property ID to 0 for dimensions and metrics common to all properties. In this + * special mode, this method will not return custom dimensions and metrics. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Metadata getMetadata(MetadataName name) { + GetMetadataRequest request = + GetMetadataRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getMetadata(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the + * dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified + * in the request, and the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + *

For example if a custom metric with parameter name `levels_unlocked` is registered to a + * property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata + * are dimensions and metrics applicable to any property such as `country` and `totalUsers`. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   String name = MetadataName.of("[PROPERTY]").toString();
+   *   Metadata response = betaAnalyticsDataClient.getMetadata(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the metadata to retrieve. This name field is + * specified in the URL path and not URL parameters. Property is a numeric Google Analytics + * GA4 Property identifier. To learn more, see [where to find your Property + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + *

Example: properties/1234/metadata + *

Set the Property ID to 0 for dimensions and metrics common to all properties. In this + * special mode, this method will not return custom dimensions and metrics. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Metadata getMetadata(String name) { + GetMetadataRequest request = GetMetadataRequest.newBuilder().setName(name).build(); + return getMetadata(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the + * dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified + * in the request, and the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + *

For example if a custom metric with parameter name `levels_unlocked` is registered to a + * property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata + * are dimensions and metrics applicable to any property such as `country` and `totalUsers`. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   GetMetadataRequest request =
+   *       GetMetadataRequest.newBuilder().setName(MetadataName.of("[PROPERTY]").toString()).build();
+   *   Metadata response = betaAnalyticsDataClient.getMetadata(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Metadata getMetadata(GetMetadataRequest request) { + return getMetadataCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns metadata for dimensions and metrics available in reporting methods. Used to explore the + * dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified + * in the request, and the metadata response includes Custom dimensions and metrics as well as + * Universal metadata. + * + *

For example if a custom metric with parameter name `levels_unlocked` is registered to a + * property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata + * are dimensions and metrics applicable to any property such as `country` and `totalUsers`. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   GetMetadataRequest request =
+   *       GetMetadataRequest.newBuilder().setName(MetadataName.of("[PROPERTY]").toString()).build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.getMetadataCallable().futureCall(request);
+   *   // Do something.
+   *   Metadata response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getMetadataCallable() { + return stub.getMetadataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * The Google Analytics Realtime API returns a customized report of realtime event data for your + * property. These reports show events and usage from the last 30 minutes. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunRealtimeReportRequest request =
+   *       RunRealtimeReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .addAllMetricAggregations(new ArrayList())
+   *           .addAllOrderBys(new ArrayList())
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   RunRealtimeReportResponse response = betaAnalyticsDataClient.runRealtimeReport(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RunRealtimeReportResponse runRealtimeReport(RunRealtimeReportRequest request) { + return runRealtimeReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * The Google Analytics Realtime API returns a customized report of realtime event data for your + * property. These reports show events and usage from the last 30 minutes. + * + *

Sample code: + * + *

{@code
+   * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+   *   RunRealtimeReportRequest request =
+   *       RunRealtimeReportRequest.newBuilder()
+   *           .setProperty("property-993141291")
+   *           .addAllDimensions(new ArrayList())
+   *           .addAllMetrics(new ArrayList())
+   *           .setDimensionFilter(FilterExpression.newBuilder().build())
+   *           .setMetricFilter(FilterExpression.newBuilder().build())
+   *           .setPageSize(883849137)
+   *           .addAllMetricAggregations(new ArrayList())
+   *           .addAllOrderBys(new ArrayList())
+   *           .setReturnPropertyQuota(true)
+   *           .build();
+   *   ApiFuture future =
+   *       betaAnalyticsDataClient.runRealtimeReportCallable().futureCall(request);
+   *   // Do something.
+   *   RunRealtimeReportResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + runRealtimeReportCallable() { + return stub.runRealtimeReportCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class RunReportPagedResponse + extends AbstractPagedListResponse< + RunReportRequest, + RunReportResponse, + DimensionHeader, + RunReportPage, + RunReportFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + RunReportPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public RunReportPagedResponse apply(RunReportPage input) { + return new RunReportPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private RunReportPagedResponse(RunReportPage page) { + super(page, RunReportFixedSizeCollection.createEmptyCollection()); + } + } + + public static class RunReportPage + extends AbstractPage { + + private RunReportPage( + PageContext context, + RunReportResponse response) { + super(context, response); + } + + private static RunReportPage createEmptyPage() { + return new RunReportPage(null, null); + } + + @Override + protected RunReportPage createPage( + PageContext context, + RunReportResponse response) { + return new RunReportPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class RunReportFixedSizeCollection + extends AbstractFixedSizeCollection< + RunReportRequest, + RunReportResponse, + DimensionHeader, + RunReportPage, + RunReportFixedSizeCollection> { + + private RunReportFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static RunReportFixedSizeCollection createEmptyCollection() { + return new RunReportFixedSizeCollection(null, 0); + } + + @Override + protected RunReportFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new RunReportFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java new file mode 100644 index 00000000..178ce375 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java @@ -0,0 +1,245 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import static com.google.analytics.data.v1beta.BetaAnalyticsDataClient.RunReportPagedResponse; + +import com.google.analytics.data.v1beta.stub.BetaAnalyticsDataStubSettings; +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BetaAnalyticsDataClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (analyticsdata.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of runPivotReport to 30 seconds: + * + *

{@code
+ * BetaAnalyticsDataSettings.Builder betaAnalyticsDataSettingsBuilder =
+ *     BetaAnalyticsDataSettings.newBuilder();
+ * betaAnalyticsDataSettingsBuilder
+ *     .runPivotReportSettings()
+ *     .setRetrySettings(
+ *         betaAnalyticsDataSettingsBuilder
+ *             .runPivotReportSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BetaAnalyticsDataSettings betaAnalyticsDataSettings = betaAnalyticsDataSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class BetaAnalyticsDataSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to runReport. */ + public PagedCallSettings + runReportSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).runReportSettings(); + } + + /** Returns the object with the settings used for calls to runPivotReport. */ + public UnaryCallSettings runPivotReportSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).runPivotReportSettings(); + } + + /** Returns the object with the settings used for calls to batchRunReports. */ + public UnaryCallSettings + batchRunReportsSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).batchRunReportsSettings(); + } + + /** Returns the object with the settings used for calls to batchRunPivotReports. */ + public UnaryCallSettings + batchRunPivotReportsSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).batchRunPivotReportsSettings(); + } + + /** Returns the object with the settings used for calls to getMetadata. */ + public UnaryCallSettings getMetadataSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).getMetadataSettings(); + } + + /** Returns the object with the settings used for calls to runRealtimeReport. */ + public UnaryCallSettings + runRealtimeReportSettings() { + return ((BetaAnalyticsDataStubSettings) getStubSettings()).runRealtimeReportSettings(); + } + + public static final BetaAnalyticsDataSettings create(BetaAnalyticsDataStubSettings stub) + throws IOException { + return new BetaAnalyticsDataSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BetaAnalyticsDataStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BetaAnalyticsDataStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BetaAnalyticsDataStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BetaAnalyticsDataSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BetaAnalyticsDataSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(BetaAnalyticsDataStubSettings.newBuilder(clientContext)); + } + + protected Builder(BetaAnalyticsDataSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BetaAnalyticsDataStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(BetaAnalyticsDataStubSettings.newBuilder()); + } + + public BetaAnalyticsDataStubSettings.Builder getStubSettingsBuilder() { + return ((BetaAnalyticsDataStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to runReport. */ + public PagedCallSettings.Builder + runReportSettings() { + return getStubSettingsBuilder().runReportSettings(); + } + + /** Returns the builder for the settings used for calls to runPivotReport. */ + public UnaryCallSettings.Builder + runPivotReportSettings() { + return getStubSettingsBuilder().runPivotReportSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunReports. */ + public UnaryCallSettings.Builder + batchRunReportsSettings() { + return getStubSettingsBuilder().batchRunReportsSettings(); + } + + /** Returns the builder for the settings used for calls to batchRunPivotReports. */ + public UnaryCallSettings.Builder + batchRunPivotReportsSettings() { + return getStubSettingsBuilder().batchRunPivotReportsSettings(); + } + + /** Returns the builder for the settings used for calls to getMetadata. */ + public UnaryCallSettings.Builder getMetadataSettings() { + return getStubSettingsBuilder().getMetadataSettings(); + } + + /** Returns the builder for the settings used for calls to runRealtimeReport. */ + public UnaryCallSettings.Builder + runRealtimeReportSettings() { + return getStubSettingsBuilder().runRealtimeReportSettings(); + } + + @Override + public BetaAnalyticsDataSettings build() throws IOException { + return new BetaAnalyticsDataSettings(this); + } + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/gapic_metadata.json b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/gapic_metadata.json new file mode 100644 index 00000000..a256b5cf --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/gapic_metadata.json @@ -0,0 +1,36 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.analytics.data.v1beta", + "libraryPackage": "com.google.analytics.data.v1beta", + "services": { + "BetaAnalyticsData": { + "clients": { + "grpc": { + "libraryClient": "BetaAnalyticsDataClient", + "rpcs": { + "BatchRunPivotReports": { + "methods": ["batchRunPivotReports", "batchRunPivotReportsCallable"] + }, + "BatchRunReports": { + "methods": ["batchRunReports", "batchRunReportsCallable"] + }, + "GetMetadata": { + "methods": ["getMetadata", "getMetadata", "getMetadata", "getMetadataCallable"] + }, + "RunPivotReport": { + "methods": ["runPivotReport", "runPivotReportCallable"] + }, + "RunRealtimeReport": { + "methods": ["runRealtimeReport", "runRealtimeReportCallable"] + }, + "RunReport": { + "methods": ["runReport", "runReportPagedCallable", "runReportCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/package-info.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/package-info.java new file mode 100644 index 00000000..4ff4a906 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/package-info.java @@ -0,0 +1,49 @@ +/* + * Copyright 2020 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. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= BetaAnalyticsDataClient ======================= + * + *

Service Description: Google Analytics reporting data service. + * + *

Sample for BetaAnalyticsDataClient: + * + *

{@code
+ * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+ *   RunPivotReportRequest request =
+ *       RunPivotReportRequest.newBuilder()
+ *           .setProperty("property-993141291")
+ *           .addAllDimensions(new ArrayList())
+ *           .addAllMetrics(new ArrayList())
+ *           .addAllDateRanges(new ArrayList())
+ *           .addAllPivots(new ArrayList())
+ *           .setDimensionFilter(FilterExpression.newBuilder().build())
+ *           .setMetricFilter(FilterExpression.newBuilder().build())
+ *           .setCurrencyCode("currencyCode1004773790")
+ *           .setCohortSpec(CohortSpec.newBuilder().build())
+ *           .setKeepEmptyRows(true)
+ *           .setReturnPropertyQuota(true)
+ *           .build();
+ *   RunPivotReportResponse response = betaAnalyticsDataClient.runPivotReport(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.analytics.data.v1beta; + +import javax.annotation.Generated; diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStub.java new file mode 100644 index 00000000..09333e35 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStub.java @@ -0,0 +1,80 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta.stub; + +import static com.google.analytics.data.v1beta.BetaAnalyticsDataClient.RunReportPagedResponse; + +import com.google.analytics.data.v1beta.BatchRunPivotReportsRequest; +import com.google.analytics.data.v1beta.BatchRunPivotReportsResponse; +import com.google.analytics.data.v1beta.BatchRunReportsRequest; +import com.google.analytics.data.v1beta.BatchRunReportsResponse; +import com.google.analytics.data.v1beta.GetMetadataRequest; +import com.google.analytics.data.v1beta.Metadata; +import com.google.analytics.data.v1beta.RunPivotReportRequest; +import com.google.analytics.data.v1beta.RunPivotReportResponse; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; +import com.google.analytics.data.v1beta.RunReportRequest; +import com.google.analytics.data.v1beta.RunReportResponse; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the BetaAnalyticsData service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class BetaAnalyticsDataStub implements BackgroundResource { + + public UnaryCallable runReportPagedCallable() { + throw new UnsupportedOperationException("Not implemented: runReportPagedCallable()"); + } + + public UnaryCallable runReportCallable() { + throw new UnsupportedOperationException("Not implemented: runReportCallable()"); + } + + public UnaryCallable runPivotReportCallable() { + throw new UnsupportedOperationException("Not implemented: runPivotReportCallable()"); + } + + public UnaryCallable batchRunReportsCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunReportsCallable()"); + } + + public UnaryCallable + batchRunPivotReportsCallable() { + throw new UnsupportedOperationException("Not implemented: batchRunPivotReportsCallable()"); + } + + public UnaryCallable getMetadataCallable() { + throw new UnsupportedOperationException("Not implemented: getMetadataCallable()"); + } + + public UnaryCallable + runRealtimeReportCallable() { + throw new UnsupportedOperationException("Not implemented: runRealtimeReportCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java new file mode 100644 index 00000000..53bccfd1 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java @@ -0,0 +1,487 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta.stub; + +import static com.google.analytics.data.v1beta.BetaAnalyticsDataClient.RunReportPagedResponse; + +import com.google.analytics.data.v1beta.BatchRunPivotReportsRequest; +import com.google.analytics.data.v1beta.BatchRunPivotReportsResponse; +import com.google.analytics.data.v1beta.BatchRunReportsRequest; +import com.google.analytics.data.v1beta.BatchRunReportsResponse; +import com.google.analytics.data.v1beta.DimensionHeader; +import com.google.analytics.data.v1beta.GetMetadataRequest; +import com.google.analytics.data.v1beta.Metadata; +import com.google.analytics.data.v1beta.RunPivotReportRequest; +import com.google.analytics.data.v1beta.RunPivotReportResponse; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; +import com.google.analytics.data.v1beta.RunReportRequest; +import com.google.analytics.data.v1beta.RunReportResponse; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link BetaAnalyticsDataStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (analyticsdata.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of runPivotReport to 30 seconds: + * + *

{@code
+ * BetaAnalyticsDataStubSettings.Builder betaAnalyticsDataSettingsBuilder =
+ *     BetaAnalyticsDataStubSettings.newBuilder();
+ * betaAnalyticsDataSettingsBuilder
+ *     .runPivotReportSettings()
+ *     .setRetrySettings(
+ *         betaAnalyticsDataSettingsBuilder
+ *             .runPivotReportSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BetaAnalyticsDataStubSettings betaAnalyticsDataSettings =
+ *     betaAnalyticsDataSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class BetaAnalyticsDataStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/analytics") + .add("https://www.googleapis.com/auth/analytics.readonly") + .build(); + + private final PagedCallSettings + runReportSettings; + private final UnaryCallSettings + runPivotReportSettings; + private final UnaryCallSettings + batchRunReportsSettings; + private final UnaryCallSettings + batchRunPivotReportsSettings; + private final UnaryCallSettings getMetadataSettings; + private final UnaryCallSettings + runRealtimeReportSettings; + + private static final PagedListDescriptor + RUN_REPORT_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public RunReportRequest injectToken(RunReportRequest payload, String token) { + return RunReportRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public RunReportRequest injectPageSize(RunReportRequest payload, int pageSize) { + return RunReportRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(RunReportRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(RunReportResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(RunReportResponse payload) { + return payload.getDimensionHeadersList() == null + ? ImmutableList.of() + : payload.getDimensionHeadersList(); + } + }; + + private static final PagedListResponseFactory< + RunReportRequest, RunReportResponse, RunReportPagedResponse> + RUN_REPORT_PAGE_STR_FACT = + new PagedListResponseFactory< + RunReportRequest, RunReportResponse, RunReportPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + RunReportRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, RUN_REPORT_PAGE_STR_DESC, request, context); + return RunReportPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to runReport. */ + public PagedCallSettings + runReportSettings() { + return runReportSettings; + } + + /** Returns the object with the settings used for calls to runPivotReport. */ + public UnaryCallSettings runPivotReportSettings() { + return runPivotReportSettings; + } + + /** Returns the object with the settings used for calls to batchRunReports. */ + public UnaryCallSettings + batchRunReportsSettings() { + return batchRunReportsSettings; + } + + /** Returns the object with the settings used for calls to batchRunPivotReports. */ + public UnaryCallSettings + batchRunPivotReportsSettings() { + return batchRunPivotReportsSettings; + } + + /** Returns the object with the settings used for calls to getMetadata. */ + public UnaryCallSettings getMetadataSettings() { + return getMetadataSettings; + } + + /** Returns the object with the settings used for calls to runRealtimeReport. */ + public UnaryCallSettings + runRealtimeReportSettings() { + return runRealtimeReportSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public BetaAnalyticsDataStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBetaAnalyticsDataStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "analyticsdata.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BetaAnalyticsDataStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected BetaAnalyticsDataStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + runReportSettings = settingsBuilder.runReportSettings().build(); + runPivotReportSettings = settingsBuilder.runPivotReportSettings().build(); + batchRunReportsSettings = settingsBuilder.batchRunReportsSettings().build(); + batchRunPivotReportsSettings = settingsBuilder.batchRunPivotReportsSettings().build(); + getMetadataSettings = settingsBuilder.getMetadataSettings().build(); + runRealtimeReportSettings = settingsBuilder.runRealtimeReportSettings().build(); + } + + /** Builder for BetaAnalyticsDataStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + RunReportRequest, RunReportResponse, RunReportPagedResponse> + runReportSettings; + private final UnaryCallSettings.Builder + runPivotReportSettings; + private final UnaryCallSettings.Builder + batchRunReportsSettings; + private final UnaryCallSettings.Builder< + BatchRunPivotReportsRequest, BatchRunPivotReportsResponse> + batchRunPivotReportsSettings; + private final UnaryCallSettings.Builder getMetadataSettings; + private final UnaryCallSettings.Builder + runRealtimeReportSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNKNOWN))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + runReportSettings = PagedCallSettings.newBuilder(RUN_REPORT_PAGE_STR_FACT); + runPivotReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchRunReportsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchRunPivotReportsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runRealtimeReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + runReportSettings, + runPivotReportSettings, + batchRunReportsSettings, + batchRunPivotReportsSettings, + getMetadataSettings, + runRealtimeReportSettings); + initDefaults(this); + } + + protected Builder(BetaAnalyticsDataStubSettings settings) { + super(settings); + + runReportSettings = settings.runReportSettings.toBuilder(); + runPivotReportSettings = settings.runPivotReportSettings.toBuilder(); + batchRunReportsSettings = settings.batchRunReportsSettings.toBuilder(); + batchRunPivotReportsSettings = settings.batchRunPivotReportsSettings.toBuilder(); + getMetadataSettings = settings.getMetadataSettings.toBuilder(); + runRealtimeReportSettings = settings.runRealtimeReportSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + runReportSettings, + runPivotReportSettings, + batchRunReportsSettings, + batchRunPivotReportsSettings, + getMetadataSettings, + runRealtimeReportSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .runReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .runPivotReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchRunReportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .batchRunPivotReportsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getMetadataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .runRealtimeReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to runReport. */ + public PagedCallSettings.Builder + runReportSettings() { + return runReportSettings; + } + + /** Returns the builder for the settings used for calls to runPivotReport. */ + public UnaryCallSettings.Builder + runPivotReportSettings() { + return runPivotReportSettings; + } + + /** Returns the builder for the settings used for calls to batchRunReports. */ + public UnaryCallSettings.Builder + batchRunReportsSettings() { + return batchRunReportsSettings; + } + + /** Returns the builder for the settings used for calls to batchRunPivotReports. */ + public UnaryCallSettings.Builder + batchRunPivotReportsSettings() { + return batchRunPivotReportsSettings; + } + + /** Returns the builder for the settings used for calls to getMetadata. */ + public UnaryCallSettings.Builder getMetadataSettings() { + return getMetadataSettings; + } + + /** Returns the builder for the settings used for calls to runRealtimeReport. */ + public UnaryCallSettings.Builder + runRealtimeReportSettings() { + return runRealtimeReportSettings; + } + + @Override + public BetaAnalyticsDataStubSettings build() throws IOException { + return new BetaAnalyticsDataStubSettings(this); + } + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataCallableFactory.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataCallableFactory.java new file mode 100644 index 00000000..c489f52f --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the BetaAnalyticsData service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBetaAnalyticsDataCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataStub.java new file mode 100644 index 00000000..a77ecb2d --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataStub.java @@ -0,0 +1,359 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta.stub; + +import static com.google.analytics.data.v1beta.BetaAnalyticsDataClient.RunReportPagedResponse; + +import com.google.analytics.data.v1beta.BatchRunPivotReportsRequest; +import com.google.analytics.data.v1beta.BatchRunPivotReportsResponse; +import com.google.analytics.data.v1beta.BatchRunReportsRequest; +import com.google.analytics.data.v1beta.BatchRunReportsResponse; +import com.google.analytics.data.v1beta.GetMetadataRequest; +import com.google.analytics.data.v1beta.Metadata; +import com.google.analytics.data.v1beta.RunPivotReportRequest; +import com.google.analytics.data.v1beta.RunPivotReportResponse; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; +import com.google.analytics.data.v1beta.RunReportRequest; +import com.google.analytics.data.v1beta.RunReportResponse; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the BetaAnalyticsData service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcBetaAnalyticsDataStub extends BetaAnalyticsDataStub { + private static final MethodDescriptor + runReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunReport") + .setRequestMarshaller(ProtoUtils.marshaller(RunReportRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RunReportResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + runPivotReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunPivotReport") + .setRequestMarshaller( + ProtoUtils.marshaller(RunPivotReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RunPivotReportResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchRunReportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/BatchRunReports") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchRunReportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchRunReportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + batchRunPivotReportsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.data.v1beta.BetaAnalyticsData/BatchRunPivotReports") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchRunPivotReportsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(BatchRunPivotReportsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getMetadataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/GetMetadata") + .setRequestMarshaller(ProtoUtils.marshaller(GetMetadataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Metadata.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + runRealtimeReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunRealtimeReport") + .setRequestMarshaller( + ProtoUtils.marshaller(RunRealtimeReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RunRealtimeReportResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable runReportCallable; + private final UnaryCallable runReportPagedCallable; + private final UnaryCallable runPivotReportCallable; + private final UnaryCallable + batchRunReportsCallable; + private final UnaryCallable + batchRunPivotReportsCallable; + private final UnaryCallable getMetadataCallable; + private final UnaryCallable + runRealtimeReportCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBetaAnalyticsDataStub create(BetaAnalyticsDataStubSettings settings) + throws IOException { + return new GrpcBetaAnalyticsDataStub(settings, ClientContext.create(settings)); + } + + public static final GrpcBetaAnalyticsDataStub create(ClientContext clientContext) + throws IOException { + return new GrpcBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBetaAnalyticsDataStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcBetaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcBetaAnalyticsDataCallableFactory()); + } + + /** + * Constructs an instance of GrpcBetaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings runReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runReportMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunReportRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + runPivotReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runPivotReportMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunPivotReportRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchRunReportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchRunReportsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchRunReportsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchRunPivotReportsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchRunPivotReportsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchRunPivotReportsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getMetadataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getMetadataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetMetadataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + runRealtimeReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runRealtimeReportMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunRealtimeReportRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("property", String.valueOf(request.getProperty())); + return params.build(); + } + }) + .build(); + + this.runReportCallable = + callableFactory.createUnaryCallable( + runReportTransportSettings, settings.runReportSettings(), clientContext); + this.runReportPagedCallable = + callableFactory.createPagedCallable( + runReportTransportSettings, settings.runReportSettings(), clientContext); + this.runPivotReportCallable = + callableFactory.createUnaryCallable( + runPivotReportTransportSettings, settings.runPivotReportSettings(), clientContext); + this.batchRunReportsCallable = + callableFactory.createUnaryCallable( + batchRunReportsTransportSettings, settings.batchRunReportsSettings(), clientContext); + this.batchRunPivotReportsCallable = + callableFactory.createUnaryCallable( + batchRunPivotReportsTransportSettings, + settings.batchRunPivotReportsSettings(), + clientContext); + this.getMetadataCallable = + callableFactory.createUnaryCallable( + getMetadataTransportSettings, settings.getMetadataSettings(), clientContext); + this.runRealtimeReportCallable = + callableFactory.createUnaryCallable( + runRealtimeReportTransportSettings, + settings.runRealtimeReportSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable runReportCallable() { + return runReportCallable; + } + + @Override + public UnaryCallable runReportPagedCallable() { + return runReportPagedCallable; + } + + @Override + public UnaryCallable runPivotReportCallable() { + return runPivotReportCallable; + } + + @Override + public UnaryCallable batchRunReportsCallable() { + return batchRunReportsCallable; + } + + @Override + public UnaryCallable + batchRunPivotReportsCallable() { + return batchRunPivotReportsCallable; + } + + @Override + public UnaryCallable getMetadataCallable() { + return getMetadataCallable; + } + + @Override + public UnaryCallable + runRealtimeReportCallable() { + return runRealtimeReportCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientTest.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientTest.java new file mode 100644 index 00000000..11d3b71e --- /dev/null +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientTest.java @@ -0,0 +1,502 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import static com.google.analytics.data.v1beta.BetaAnalyticsDataClient.RunReportPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BetaAnalyticsDataClientTest { + private static MockServiceHelper mockServiceHelper; + private BetaAnalyticsDataClient client; + private static MockBetaAnalyticsData mockBetaAnalyticsData; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockBetaAnalyticsData = new MockBetaAnalyticsData(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockBetaAnalyticsData)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + BetaAnalyticsDataSettings settings = + BetaAnalyticsDataSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BetaAnalyticsDataClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void runReportTest() throws Exception { + DimensionHeader responsesElement = DimensionHeader.newBuilder().build(); + RunReportResponse expectedResponse = + RunReportResponse.newBuilder() + .setNextPageToken("") + .addAllDimensionHeaders(Arrays.asList(responsesElement)) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + RunReportRequest request = + RunReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + + RunReportPagedResponse pagedListResponse = client.runReport(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDimensionHeadersList().get(0), resources.get(0)); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunReportRequest actualRequest = ((RunReportRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); + Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); + Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals( + request.getMetricAggregationsList(), actualRequest.getMetricAggregationsList()); + Assert.assertEquals(request.getOrderBysList(), actualRequest.getOrderBysList()); + Assert.assertEquals(request.getCurrencyCode(), actualRequest.getCurrencyCode()); + Assert.assertEquals(request.getCohortSpec(), actualRequest.getCohortSpec()); + Assert.assertEquals(request.getKeepEmptyRows(), actualRequest.getKeepEmptyRows()); + Assert.assertEquals(request.getReturnPropertyQuota(), actualRequest.getReturnPropertyQuota()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + RunReportRequest request = + RunReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + client.runReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runPivotReportTest() throws Exception { + RunPivotReportResponse expectedResponse = + RunPivotReportResponse.newBuilder() + .addAllPivotHeaders(new ArrayList()) + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllAggregates(new ArrayList()) + .setMetadata(ResponseMetaData.newBuilder().build()) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .addAllPivots(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + + RunPivotReportResponse actualResponse = client.runPivotReport(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunPivotReportRequest actualRequest = ((RunPivotReportRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); + Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); + Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); + Assert.assertEquals(request.getPivotsList(), actualRequest.getPivotsList()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + Assert.assertEquals(request.getCurrencyCode(), actualRequest.getCurrencyCode()); + Assert.assertEquals(request.getCohortSpec(), actualRequest.getCohortSpec()); + Assert.assertEquals(request.getKeepEmptyRows(), actualRequest.getKeepEmptyRows()); + Assert.assertEquals(request.getReturnPropertyQuota(), actualRequest.getReturnPropertyQuota()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runPivotReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .addAllPivots(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + client.runPivotReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchRunReportsTest() throws Exception { + BatchRunReportsResponse expectedResponse = + BatchRunReportsResponse.newBuilder() + .addAllReports(new ArrayList()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setProperty("property-993141291") + .addAllRequests(new ArrayList()) + .build(); + + BatchRunReportsResponse actualResponse = client.batchRunReports(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunReportsRequest actualRequest = ((BatchRunReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunReportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setProperty("property-993141291") + .addAllRequests(new ArrayList()) + .build(); + client.batchRunReports(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchRunPivotReportsTest() throws Exception { + BatchRunPivotReportsResponse expectedResponse = + BatchRunPivotReportsResponse.newBuilder() + .addAllPivotReports(new ArrayList()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setProperty("property-993141291") + .addAllRequests(new ArrayList()) + .build(); + + BatchRunPivotReportsResponse actualResponse = client.batchRunPivotReports(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchRunPivotReportsRequest actualRequest = + ((BatchRunPivotReportsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchRunPivotReportsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setProperty("property-993141291") + .addAllRequests(new ArrayList()) + .build(); + client.batchRunPivotReports(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataTest() throws Exception { + Metadata expectedResponse = + Metadata.newBuilder() + .setName(MetadataName.of("[PROPERTY]").toString()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + MetadataName name = MetadataName.of("[PROPERTY]"); + + Metadata actualResponse = client.getMetadata(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataRequest actualRequest = ((GetMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + MetadataName name = MetadataName.of("[PROPERTY]"); + client.getMetadata(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataTest2() throws Exception { + Metadata expectedResponse = + Metadata.newBuilder() + .setName(MetadataName.of("[PROPERTY]").toString()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + String name = "name3373707"; + + Metadata actualResponse = client.getMetadata(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetMetadataRequest actualRequest = ((GetMetadataRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getMetadataExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + String name = "name3373707"; + client.getMetadata(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runRealtimeReportTest() throws Exception { + RunRealtimeReportResponse expectedResponse = + RunRealtimeReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllTotals(new ArrayList()) + .addAllMaximums(new ArrayList()) + .addAllMinimums(new ArrayList()) + .setTotalSize(-705419236) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .build(); + mockBetaAnalyticsData.addResponse(expectedResponse); + + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setPageSize(883849137) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .build(); + + RunRealtimeReportResponse actualResponse = client.runRealtimeReport(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBetaAnalyticsData.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunRealtimeReportRequest actualRequest = ((RunRealtimeReportRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProperty(), actualRequest.getProperty()); + Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); + Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals( + request.getMetricAggregationsList(), actualRequest.getMetricAggregationsList()); + Assert.assertEquals(request.getOrderBysList(), actualRequest.getOrderBysList()); + Assert.assertEquals(request.getReturnPropertyQuota(), actualRequest.getReturnPropertyQuota()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runRealtimeReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBetaAnalyticsData.addException(exception); + + try { + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setPageSize(883849137) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .build(); + client.runRealtimeReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsData.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsData.java new file mode 100644 index 00000000..891fc422 --- /dev/null +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsData.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBetaAnalyticsData implements MockGrpcService { + private final MockBetaAnalyticsDataImpl serviceImpl; + + public MockBetaAnalyticsData() { + serviceImpl = new MockBetaAnalyticsDataImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsDataImpl.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsDataImpl.java new file mode 100644 index 00000000..2186512f --- /dev/null +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsDataImpl.java @@ -0,0 +1,187 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import com.google.analytics.data.v1beta.BetaAnalyticsDataGrpc.BetaAnalyticsDataImplBase; +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBetaAnalyticsDataImpl extends BetaAnalyticsDataImplBase { + private List requests; + private Queue responses; + + public MockBetaAnalyticsDataImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void runReport( + RunReportRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof RunReportResponse) { + requests.add(request); + responseObserver.onNext(((RunReportResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunReport, expected %s or %s", + response.getClass().getName(), + RunReportResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void runPivotReport( + RunPivotReportRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof RunPivotReportResponse) { + requests.add(request); + responseObserver.onNext(((RunPivotReportResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunPivotReport, expected %s or %s", + response.getClass().getName(), + RunPivotReportResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchRunReports( + BatchRunReportsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchRunReportsResponse) { + requests.add(request); + responseObserver.onNext(((BatchRunReportsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchRunReports, expected %s or %s", + response.getClass().getName(), + BatchRunReportsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchRunPivotReports( + BatchRunPivotReportsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof BatchRunPivotReportsResponse) { + requests.add(request); + responseObserver.onNext(((BatchRunPivotReportsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchRunPivotReports, expected %s or %s", + response.getClass().getName(), + BatchRunPivotReportsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getMetadata(GetMetadataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Metadata) { + requests.add(request); + responseObserver.onNext(((Metadata) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetMetadata, expected %s or %s", + response.getClass().getName(), + Metadata.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void runRealtimeReport( + RunRealtimeReportRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof RunRealtimeReportResponse) { + requests.add(request); + responseObserver.onNext(((RunRealtimeReportResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RunRealtimeReport, expected %s or %s", + response.getClass().getName(), + RunRealtimeReportResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-analytics-data-v1alpha/clirr-ignored-differences.xml b/grpc-google-analytics-data-v1alpha/clirr-ignored-differences.xml deleted file mode 100644 index dbfa880d..00000000 --- a/grpc-google-analytics-data-v1alpha/clirr-ignored-differences.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - 7002 - com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc* - * getUniversalMetadata(*) - - - 7002 - com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc - * getGetUniversalMetadataMethod() - - diff --git a/grpc-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataGrpc.java b/grpc-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataGrpc.java new file mode 100644 index 00000000..be2bc6ce --- /dev/null +++ b/grpc-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataGrpc.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2020 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. + */ +package com.google.analytics.data.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Google Analytics reporting data service.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/analytics/data/v1beta/analytics_data_api.proto") +public final class BetaAnalyticsDataGrpc { + + private BetaAnalyticsDataGrpc() {} + + public static final String SERVICE_NAME = "google.analytics.data.v1beta.BetaAnalyticsData"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportResponse> + getRunReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunReport", + requestType = com.google.analytics.data.v1beta.RunReportRequest.class, + responseType = com.google.analytics.data.v1beta.RunReportResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportResponse> + getRunReportMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportResponse> + getRunReportMethod; + if ((getRunReportMethod = BetaAnalyticsDataGrpc.getRunReportMethod) == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getRunReportMethod = BetaAnalyticsDataGrpc.getRunReportMethod) == null) { + BetaAnalyticsDataGrpc.getRunReportMethod = + getRunReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunReportResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("RunReport")) + .build(); + } + } + } + return getRunReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportResponse> + getRunPivotReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunPivotReport", + requestType = com.google.analytics.data.v1beta.RunPivotReportRequest.class, + responseType = com.google.analytics.data.v1beta.RunPivotReportResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportResponse> + getRunPivotReportMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportResponse> + getRunPivotReportMethod; + if ((getRunPivotReportMethod = BetaAnalyticsDataGrpc.getRunPivotReportMethod) == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getRunPivotReportMethod = BetaAnalyticsDataGrpc.getRunPivotReportMethod) == null) { + BetaAnalyticsDataGrpc.getRunPivotReportMethod = + getRunPivotReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunPivotReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunPivotReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunPivotReportResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("RunPivotReport")) + .build(); + } + } + } + return getRunPivotReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunReportsRequest, + com.google.analytics.data.v1beta.BatchRunReportsResponse> + getBatchRunReportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchRunReports", + requestType = com.google.analytics.data.v1beta.BatchRunReportsRequest.class, + responseType = com.google.analytics.data.v1beta.BatchRunReportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunReportsRequest, + com.google.analytics.data.v1beta.BatchRunReportsResponse> + getBatchRunReportsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunReportsRequest, + com.google.analytics.data.v1beta.BatchRunReportsResponse> + getBatchRunReportsMethod; + if ((getBatchRunReportsMethod = BetaAnalyticsDataGrpc.getBatchRunReportsMethod) == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getBatchRunReportsMethod = BetaAnalyticsDataGrpc.getBatchRunReportsMethod) == null) { + BetaAnalyticsDataGrpc.getBatchRunReportsMethod = + getBatchRunReportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchRunReports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.BatchRunReportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.BatchRunReportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("BatchRunReports")) + .build(); + } + } + } + return getBatchRunReportsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse> + getBatchRunPivotReportsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchRunPivotReports", + requestType = com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.class, + responseType = com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse> + getBatchRunPivotReportsMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse> + getBatchRunPivotReportsMethod; + if ((getBatchRunPivotReportsMethod = BetaAnalyticsDataGrpc.getBatchRunPivotReportsMethod) + == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getBatchRunPivotReportsMethod = BetaAnalyticsDataGrpc.getBatchRunPivotReportsMethod) + == null) { + BetaAnalyticsDataGrpc.getBatchRunPivotReportsMethod = + getBatchRunPivotReportsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchRunPivotReports")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("BatchRunPivotReports")) + .build(); + } + } + } + return getBatchRunPivotReportsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.GetMetadataRequest, + com.google.analytics.data.v1beta.Metadata> + getGetMetadataMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetMetadata", + requestType = com.google.analytics.data.v1beta.GetMetadataRequest.class, + responseType = com.google.analytics.data.v1beta.Metadata.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.GetMetadataRequest, + com.google.analytics.data.v1beta.Metadata> + getGetMetadataMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.GetMetadataRequest, + com.google.analytics.data.v1beta.Metadata> + getGetMetadataMethod; + if ((getGetMetadataMethod = BetaAnalyticsDataGrpc.getGetMetadataMethod) == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getGetMetadataMethod = BetaAnalyticsDataGrpc.getGetMetadataMethod) == null) { + BetaAnalyticsDataGrpc.getGetMetadataMethod = + getGetMetadataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetMetadata")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.GetMetadataRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.Metadata.getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("GetMetadata")) + .build(); + } + } + } + return getGetMetadataMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunRealtimeReportRequest, + com.google.analytics.data.v1beta.RunRealtimeReportResponse> + getRunRealtimeReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunRealtimeReport", + requestType = com.google.analytics.data.v1beta.RunRealtimeReportRequest.class, + responseType = com.google.analytics.data.v1beta.RunRealtimeReportResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunRealtimeReportRequest, + com.google.analytics.data.v1beta.RunRealtimeReportResponse> + getRunRealtimeReportMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.data.v1beta.RunRealtimeReportRequest, + com.google.analytics.data.v1beta.RunRealtimeReportResponse> + getRunRealtimeReportMethod; + if ((getRunRealtimeReportMethod = BetaAnalyticsDataGrpc.getRunRealtimeReportMethod) == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + if ((getRunRealtimeReportMethod = BetaAnalyticsDataGrpc.getRunRealtimeReportMethod) + == null) { + BetaAnalyticsDataGrpc.getRunRealtimeReportMethod = + getRunRealtimeReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunRealtimeReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunRealtimeReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.data.v1beta.RunRealtimeReportResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new BetaAnalyticsDataMethodDescriptorSupplier("RunRealtimeReport")) + .build(); + } + } + } + return getRunRealtimeReportMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static BetaAnalyticsDataStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BetaAnalyticsDataStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataStub(channel, callOptions); + } + }; + return BetaAnalyticsDataStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BetaAnalyticsDataBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BetaAnalyticsDataBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataBlockingStub(channel, callOptions); + } + }; + return BetaAnalyticsDataBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BetaAnalyticsDataFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BetaAnalyticsDataFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataFutureStub(channel, callOptions); + } + }; + return BetaAnalyticsDataFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Google Analytics reporting data service.
+   * 
+ */ + public abstract static class BetaAnalyticsDataImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns a customized report of your Google Analytics event data. Reports
+     * contain statistics derived from data collected by the Google Analytics
+     * tracking code. The data returned from the API is as a table with columns
+     * for the requested dimensions and metrics. Metrics are individual
+     * measurements of user activity on your property, such as active users or
+     * event count. Dimensions break down metrics across some common criteria,
+     * such as country or event name.
+     * 
+ */ + public void runReport( + com.google.analytics.data.v1beta.RunReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getRunReportMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a customized pivot report of your Google Analytics event data.
+     * Pivot reports are more advanced and expressive formats than regular
+     * reports. In a pivot report, dimensions are only visible if they are
+     * included in a pivot. Multiple pivots can be specified to further dissect
+     * your data.
+     * 
+ */ + public void runPivotReport( + com.google.analytics.data.v1beta.RunPivotReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getRunPivotReportMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns multiple reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public void batchRunReports( + com.google.analytics.data.v1beta.BatchRunReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getBatchRunReportsMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns multiple pivot reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public void batchRunPivotReports( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getBatchRunPivotReportsMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns metadata for dimensions and metrics available in reporting methods.
+     * Used to explore the dimensions and metrics. In this method, a Google
+     * Analytics GA4 Property Identifier is specified in the request, and
+     * the metadata response includes Custom dimensions and metrics as well as
+     * Universal metadata.
+     * For example if a custom metric with parameter name `levels_unlocked` is
+     * registered to a property, the Metadata response will contain
+     * `customEvent:levels_unlocked`. Universal metadata are dimensions and
+     * metrics applicable to any property such as `country` and `totalUsers`.
+     * 
+ */ + public void getMetadata( + com.google.analytics.data.v1beta.GetMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetMetadataMethod(), responseObserver); + } + + /** + * + * + *
+     * The Google Analytics Realtime API returns a customized report of realtime
+     * event data for your property. These reports show events and usage from the
+     * last 30 minutes.
+     * 
+ */ + public void runRealtimeReport( + com.google.analytics.data.v1beta.RunRealtimeReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getRunRealtimeReportMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRunReportMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportResponse>( + this, METHODID_RUN_REPORT))) + .addMethod( + getRunPivotReportMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportResponse>( + this, METHODID_RUN_PIVOT_REPORT))) + .addMethod( + getBatchRunReportsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.BatchRunReportsRequest, + com.google.analytics.data.v1beta.BatchRunReportsResponse>( + this, METHODID_BATCH_RUN_REPORTS))) + .addMethod( + getBatchRunPivotReportsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse>( + this, METHODID_BATCH_RUN_PIVOT_REPORTS))) + .addMethod( + getGetMetadataMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.GetMetadataRequest, + com.google.analytics.data.v1beta.Metadata>(this, METHODID_GET_METADATA))) + .addMethod( + getRunRealtimeReportMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.data.v1beta.RunRealtimeReportRequest, + com.google.analytics.data.v1beta.RunRealtimeReportResponse>( + this, METHODID_RUN_REALTIME_REPORT))) + .build(); + } + } + + /** + * + * + *
+   * Google Analytics reporting data service.
+   * 
+ */ + public static final class BetaAnalyticsDataStub + extends io.grpc.stub.AbstractAsyncStub { + private BetaAnalyticsDataStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BetaAnalyticsDataStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns a customized report of your Google Analytics event data. Reports
+     * contain statistics derived from data collected by the Google Analytics
+     * tracking code. The data returned from the API is as a table with columns
+     * for the requested dimensions and metrics. Metrics are individual
+     * measurements of user activity on your property, such as active users or
+     * event count. Dimensions break down metrics across some common criteria,
+     * such as country or event name.
+     * 
+ */ + public void runReport( + com.google.analytics.data.v1beta.RunReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunReportMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns a customized pivot report of your Google Analytics event data.
+     * Pivot reports are more advanced and expressive formats than regular
+     * reports. In a pivot report, dimensions are only visible if they are
+     * included in a pivot. Multiple pivots can be specified to further dissect
+     * your data.
+     * 
+ */ + public void runPivotReport( + com.google.analytics.data.v1beta.RunPivotReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunPivotReportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns multiple reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public void batchRunReports( + com.google.analytics.data.v1beta.BatchRunReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchRunReportsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns multiple pivot reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public void batchRunPivotReports( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBatchRunPivotReportsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns metadata for dimensions and metrics available in reporting methods.
+     * Used to explore the dimensions and metrics. In this method, a Google
+     * Analytics GA4 Property Identifier is specified in the request, and
+     * the metadata response includes Custom dimensions and metrics as well as
+     * Universal metadata.
+     * For example if a custom metric with parameter name `levels_unlocked` is
+     * registered to a property, the Metadata response will contain
+     * `customEvent:levels_unlocked`. Universal metadata are dimensions and
+     * metrics applicable to any property such as `country` and `totalUsers`.
+     * 
+ */ + public void getMetadata( + com.google.analytics.data.v1beta.GetMetadataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetMetadataMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * The Google Analytics Realtime API returns a customized report of realtime
+     * event data for your property. These reports show events and usage from the
+     * last 30 minutes.
+     * 
+ */ + public void runRealtimeReport( + com.google.analytics.data.v1beta.RunRealtimeReportRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunRealtimeReportMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Google Analytics reporting data service.
+   * 
+ */ + public static final class BetaAnalyticsDataBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BetaAnalyticsDataBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BetaAnalyticsDataBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns a customized report of your Google Analytics event data. Reports
+     * contain statistics derived from data collected by the Google Analytics
+     * tracking code. The data returned from the API is as a table with columns
+     * for the requested dimensions and metrics. Metrics are individual
+     * measurements of user activity on your property, such as active users or
+     * event count. Dimensions break down metrics across some common criteria,
+     * such as country or event name.
+     * 
+ */ + public com.google.analytics.data.v1beta.RunReportResponse runReport( + com.google.analytics.data.v1beta.RunReportRequest request) { + return blockingUnaryCall(getChannel(), getRunReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a customized pivot report of your Google Analytics event data.
+     * Pivot reports are more advanced and expressive formats than regular
+     * reports. In a pivot report, dimensions are only visible if they are
+     * included in a pivot. Multiple pivots can be specified to further dissect
+     * your data.
+     * 
+ */ + public com.google.analytics.data.v1beta.RunPivotReportResponse runPivotReport( + com.google.analytics.data.v1beta.RunPivotReportRequest request) { + return blockingUnaryCall(getChannel(), getRunPivotReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns multiple reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public com.google.analytics.data.v1beta.BatchRunReportsResponse batchRunReports( + com.google.analytics.data.v1beta.BatchRunReportsRequest request) { + return blockingUnaryCall(getChannel(), getBatchRunReportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns multiple pivot reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public com.google.analytics.data.v1beta.BatchRunPivotReportsResponse batchRunPivotReports( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest request) { + return blockingUnaryCall( + getChannel(), getBatchRunPivotReportsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns metadata for dimensions and metrics available in reporting methods.
+     * Used to explore the dimensions and metrics. In this method, a Google
+     * Analytics GA4 Property Identifier is specified in the request, and
+     * the metadata response includes Custom dimensions and metrics as well as
+     * Universal metadata.
+     * For example if a custom metric with parameter name `levels_unlocked` is
+     * registered to a property, the Metadata response will contain
+     * `customEvent:levels_unlocked`. Universal metadata are dimensions and
+     * metrics applicable to any property such as `country` and `totalUsers`.
+     * 
+ */ + public com.google.analytics.data.v1beta.Metadata getMetadata( + com.google.analytics.data.v1beta.GetMetadataRequest request) { + return blockingUnaryCall(getChannel(), getGetMetadataMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * The Google Analytics Realtime API returns a customized report of realtime
+     * event data for your property. These reports show events and usage from the
+     * last 30 minutes.
+     * 
+ */ + public com.google.analytics.data.v1beta.RunRealtimeReportResponse runRealtimeReport( + com.google.analytics.data.v1beta.RunRealtimeReportRequest request) { + return blockingUnaryCall( + getChannel(), getRunRealtimeReportMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Google Analytics reporting data service.
+   * 
+ */ + public static final class BetaAnalyticsDataFutureStub + extends io.grpc.stub.AbstractFutureStub { + private BetaAnalyticsDataFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BetaAnalyticsDataFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BetaAnalyticsDataFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns a customized report of your Google Analytics event data. Reports
+     * contain statistics derived from data collected by the Google Analytics
+     * tracking code. The data returned from the API is as a table with columns
+     * for the requested dimensions and metrics. Metrics are individual
+     * measurements of user activity on your property, such as active users or
+     * event count. Dimensions break down metrics across some common criteria,
+     * such as country or event name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.RunReportResponse> + runReport(com.google.analytics.data.v1beta.RunReportRequest request) { + return futureUnaryCall(getChannel().newCall(getRunReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a customized pivot report of your Google Analytics event data.
+     * Pivot reports are more advanced and expressive formats than regular
+     * reports. In a pivot report, dimensions are only visible if they are
+     * included in a pivot. Multiple pivots can be specified to further dissect
+     * your data.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.RunPivotReportResponse> + runPivotReport(com.google.analytics.data.v1beta.RunPivotReportRequest request) { + return futureUnaryCall( + getChannel().newCall(getRunPivotReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns multiple reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.BatchRunReportsResponse> + batchRunReports(com.google.analytics.data.v1beta.BatchRunReportsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchRunReportsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns multiple pivot reports in a batch. All reports must be for the same
+     * GA4 Property.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse> + batchRunPivotReports(com.google.analytics.data.v1beta.BatchRunPivotReportsRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchRunPivotReportsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns metadata for dimensions and metrics available in reporting methods.
+     * Used to explore the dimensions and metrics. In this method, a Google
+     * Analytics GA4 Property Identifier is specified in the request, and
+     * the metadata response includes Custom dimensions and metrics as well as
+     * Universal metadata.
+     * For example if a custom metric with parameter name `levels_unlocked` is
+     * registered to a property, the Metadata response will contain
+     * `customEvent:levels_unlocked`. Universal metadata are dimensions and
+     * metrics applicable to any property such as `country` and `totalUsers`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.Metadata> + getMetadata(com.google.analytics.data.v1beta.GetMetadataRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetMetadataMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * The Google Analytics Realtime API returns a customized report of realtime
+     * event data for your property. These reports show events and usage from the
+     * last 30 minutes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.data.v1beta.RunRealtimeReportResponse> + runRealtimeReport(com.google.analytics.data.v1beta.RunRealtimeReportRequest request) { + return futureUnaryCall( + getChannel().newCall(getRunRealtimeReportMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_RUN_REPORT = 0; + private static final int METHODID_RUN_PIVOT_REPORT = 1; + private static final int METHODID_BATCH_RUN_REPORTS = 2; + private static final int METHODID_BATCH_RUN_PIVOT_REPORTS = 3; + private static final int METHODID_GET_METADATA = 4; + private static final int METHODID_RUN_REALTIME_REPORT = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final BetaAnalyticsDataImplBase serviceImpl; + private final int methodId; + + MethodHandlers(BetaAnalyticsDataImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_RUN_REPORT: + serviceImpl.runReport( + (com.google.analytics.data.v1beta.RunReportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RUN_PIVOT_REPORT: + serviceImpl.runPivotReport( + (com.google.analytics.data.v1beta.RunPivotReportRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_BATCH_RUN_REPORTS: + serviceImpl.batchRunReports( + (com.google.analytics.data.v1beta.BatchRunReportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.data.v1beta.BatchRunReportsResponse>) + responseObserver); + break; + case METHODID_BATCH_RUN_PIVOT_REPORTS: + serviceImpl.batchRunPivotReports( + (com.google.analytics.data.v1beta.BatchRunPivotReportsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse>) + responseObserver); + break; + case METHODID_GET_METADATA: + serviceImpl.getMetadata( + (com.google.analytics.data.v1beta.GetMetadataRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RUN_REALTIME_REPORT: + serviceImpl.runRealtimeReport( + (com.google.analytics.data.v1beta.RunRealtimeReportRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.data.v1beta.RunRealtimeReportResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class BetaAnalyticsDataBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BetaAnalyticsDataBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BetaAnalyticsData"); + } + } + + private static final class BetaAnalyticsDataFileDescriptorSupplier + extends BetaAnalyticsDataBaseDescriptorSupplier { + BetaAnalyticsDataFileDescriptorSupplier() {} + } + + private static final class BetaAnalyticsDataMethodDescriptorSupplier + extends BetaAnalyticsDataBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + BetaAnalyticsDataMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BetaAnalyticsDataGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BetaAnalyticsDataFileDescriptorSupplier()) + .addMethod(getRunReportMethod()) + .addMethod(getRunPivotReportMethod()) + .addMethod(getBatchRunReportsMethod()) + .addMethod(getBatchRunPivotReportsMethod()) + .addMethod(getGetMetadataMethod()) + .addMethod(getRunRealtimeReportMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/AnalyticsDataApiProto.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/AnalyticsDataApiProto.java new file mode 100644 index 00000000..a6b8318a --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/AnalyticsDataApiProto.java @@ -0,0 +1,407 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public final class AnalyticsDataApiProto { + private AnalyticsDataApiProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Metadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunReportResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunPivotReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunPivotReportResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_GetMetadataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n5google/analytics/data/v1beta/analytics" + + "_data_api.proto\022\034google.analytics.data.v" + + "1beta\032\'google/analytics/data/v1beta/data" + + ".proto\032\034google/api/annotations.proto\032\027go" + + "ogle/api/client.proto\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\"\350\001\n\010Metadata\022\014\n\004name\030\003 \001(\t\022C\n\ndimensio" + + "ns\030\001 \003(\0132/.google.analytics.data.v1beta." + + "DimensionMetadata\022=\n\007metrics\030\002 \003(\0132,.goo" + + "gle.analytics.data.v1beta.MetricMetadata" + + ":J\352AG\n%analyticsdata.googleapis.com/Meta" + + "data\022\036properties/{property}/metadata\"\244\005\n" + + "\020RunReportRequest\022\020\n\010property\030\001 \001(\t\022;\n\nd" + + "imensions\030\002 \003(\0132\'.google.analytics.data." + + "v1beta.Dimension\0225\n\007metrics\030\003 \003(\0132$.goog" + + "le.analytics.data.v1beta.Metric\022<\n\013date_" + + "ranges\030\004 \003(\0132\'.google.analytics.data.v1b" + + "eta.DateRange\022H\n\020dimension_filter\030\005 \001(\0132" + + "..google.analytics.data.v1beta.FilterExp" + + "ression\022E\n\rmetric_filter\030\006 \001(\0132..google." + + "analytics.data.v1beta.FilterExpression\022\021" + + "\n\tpage_size\030\007 \001(\005\022\022\n\npage_token\030\010 \001(\t\022L\n" + + "\023metric_aggregations\030\t \003(\0162/.google.anal" + + "ytics.data.v1beta.MetricAggregation\0228\n\to" + + "rder_bys\030\n \003(\0132%.google.analytics.data.v" + + "1beta.OrderBy\022\025\n\rcurrency_code\030\013 \001(\t\022=\n\013" + + "cohort_spec\030\014 \001(\0132(.google.analytics.dat" + + "a.v1beta.CohortSpec\022\027\n\017keep_empty_rows\030\r" + + " \001(\010\022\035\n\025return_property_quota\030\016 \001(\010\"\243\004\n\021" + + "RunReportResponse\022H\n\021dimension_headers\030\001" + + " \003(\0132-.google.analytics.data.v1beta.Dime" + + "nsionHeader\022B\n\016metric_headers\030\002 \003(\0132*.go" + + "ogle.analytics.data.v1beta.MetricHeader\022" + + "/\n\004rows\030\003 \003(\0132!.google.analytics.data.v1" + + "beta.Row\0221\n\006totals\030\004 \003(\0132!.google.analyt" + + "ics.data.v1beta.Row\0223\n\010maximums\030\005 \003(\0132!." + + "google.analytics.data.v1beta.Row\0223\n\010mini" + + "mums\030\006 \003(\0132!.google.analytics.data.v1bet" + + "a.Row\022\027\n\017next_page_token\030\007 \001(\t\022\022\n\ntotal_" + + "size\030\010 \001(\005\022@\n\010metadata\030\t \001(\0132..google.an" + + "alytics.data.v1beta.ResponseMetaData\022C\n\016" + + "property_quota\030\n \001(\0132+.google.analytics." + + "data.v1beta.PropertyQuota\"\257\004\n\025RunPivotRe" + + "portRequest\022\020\n\010property\030\001 \001(\t\022;\n\ndimensi" + + "ons\030\002 \003(\0132\'.google.analytics.data.v1beta" + + ".Dimension\0225\n\007metrics\030\003 \003(\0132$.google.ana" + + "lytics.data.v1beta.Metric\022<\n\013date_ranges" + + "\030\004 \003(\0132\'.google.analytics.data.v1beta.Da" + + "teRange\0223\n\006pivots\030\005 \003(\0132#.google.analyti" + + "cs.data.v1beta.Pivot\022H\n\020dimension_filter" + + "\030\006 \001(\0132..google.analytics.data.v1beta.Fi" + + "lterExpression\022E\n\rmetric_filter\030\007 \001(\0132.." + + "google.analytics.data.v1beta.FilterExpre" + + "ssion\022\025\n\rcurrency_code\030\010 \001(\t\022=\n\013cohort_s" + + "pec\030\t \001(\0132(.google.analytics.data.v1beta" + + ".CohortSpec\022\027\n\017keep_empty_rows\030\n \001(\010\022\035\n\025" + + "return_property_quota\030\013 \001(\010\"\327\003\n\026RunPivot" + + "ReportResponse\022@\n\rpivot_headers\030\001 \003(\0132)." + + "google.analytics.data.v1beta.PivotHeader" + + "\022H\n\021dimension_headers\030\002 \003(\0132-.google.ana" + + "lytics.data.v1beta.DimensionHeader\022B\n\016me" + + "tric_headers\030\003 \003(\0132*.google.analytics.da" + + "ta.v1beta.MetricHeader\022/\n\004rows\030\004 \003(\0132!.g" + + "oogle.analytics.data.v1beta.Row\0225\n\naggre" + + "gates\030\005 \003(\0132!.google.analytics.data.v1be" + + "ta.Row\022@\n\010metadata\030\006 \001(\0132..google.analyt" + + "ics.data.v1beta.ResponseMetaData\022C\n\016prop" + + "erty_quota\030\007 \001(\0132+.google.analytics.data" + + ".v1beta.PropertyQuota\"l\n\026BatchRunReports" + + "Request\022\020\n\010property\030\001 \001(\t\022@\n\010requests\030\002 " + + "\003(\0132..google.analytics.data.v1beta.RunRe" + + "portRequest\"[\n\027BatchRunReportsResponse\022@" + + "\n\007reports\030\001 \003(\0132/.google.analytics.data." + + "v1beta.RunReportResponse\"v\n\033BatchRunPivo" + + "tReportsRequest\022\020\n\010property\030\001 \001(\t\022E\n\010req" + + "uests\030\002 \003(\01323.google.analytics.data.v1be" + + "ta.RunPivotReportRequest\"k\n\034BatchRunPivo" + + "tReportsResponse\022K\n\rpivot_reports\030\001 \003(\0132" + + "4.google.analytics.data.v1beta.RunPivotR" + + "eportResponse\"Q\n\022GetMetadataRequest\022;\n\004n" + + "ame\030\001 \001(\tB-\340A\002\372A\'\n%analyticsdata.googlea" + + "pis.com/Metadata\"\353\003\n\030RunRealtimeReportRe" + + "quest\022\020\n\010property\030\001 \001(\t\022;\n\ndimensions\030\002 " + + "\003(\0132\'.google.analytics.data.v1beta.Dimen" + + "sion\0225\n\007metrics\030\003 \003(\0132$.google.analytics" + + ".data.v1beta.Metric\022H\n\020dimension_filter\030" + + "\004 \001(\0132..google.analytics.data.v1beta.Fil" + + "terExpression\022E\n\rmetric_filter\030\005 \001(\0132..g" + + "oogle.analytics.data.v1beta.FilterExpres" + + "sion\022\021\n\tpage_size\030\006 \001(\005\022L\n\023metric_aggreg" + + "ations\030\007 \003(\0162/.google.analytics.data.v1b" + + "eta.MetricAggregation\0228\n\torder_bys\030\010 \003(\013" + + "2%.google.analytics.data.v1beta.OrderBy\022" + + "\035\n\025return_property_quota\030\t \001(\010\"\320\003\n\031RunRe" + + "altimeReportResponse\022H\n\021dimension_header" + + "s\030\001 \003(\0132-.google.analytics.data.v1beta.D" + + "imensionHeader\022B\n\016metric_headers\030\002 \003(\0132*" + + ".google.analytics.data.v1beta.MetricHead" + + "er\022/\n\004rows\030\003 \003(\0132!.google.analytics.data" + + ".v1beta.Row\0221\n\006totals\030\004 \003(\0132!.google.ana" + + "lytics.data.v1beta.Row\0223\n\010maximums\030\005 \003(\013" + + "2!.google.analytics.data.v1beta.Row\0223\n\010m" + + "inimums\030\006 \003(\0132!.google.analytics.data.v1" + + "beta.Row\022\022\n\ntotal_size\030\007 \001(\005\022C\n\016property" + + "_quota\030\010 \001(\0132+.google.analytics.data.v1b" + + "eta.PropertyQuota2\343\t\n\021BetaAnalyticsData\022" + + "\242\001\n\tRunReport\022..google.analytics.data.v1" + + "beta.RunReportRequest\032/.google.analytics" + + ".data.v1beta.RunReportResponse\"4\202\323\344\223\002.\")" + + "/v1beta/{property=properties/*}:runRepor" + + "t:\001*\022\266\001\n\016RunPivotReport\0223.google.analyti" + + "cs.data.v1beta.RunPivotReportRequest\0324.g" + + "oogle.analytics.data.v1beta.RunPivotRepo" + + "rtResponse\"9\202\323\344\223\0023\"./v1beta/{property=pr" + + "operties/*}:runPivotReport:\001*\022\272\001\n\017BatchR" + + "unReports\0224.google.analytics.data.v1beta" + + ".BatchRunReportsRequest\0325.google.analyti" + + "cs.data.v1beta.BatchRunReportsResponse\":" + + "\202\323\344\223\0024\"//v1beta/{property=properties/*}:" + + "batchRunReports:\001*\022\316\001\n\024BatchRunPivotRepo" + + "rts\0229.google.analytics.data.v1beta.Batch" + + "RunPivotReportsRequest\032:.google.analytic" + + "s.data.v1beta.BatchRunPivotReportsRespon" + + "se\"?\202\323\344\223\0029\"4/v1beta/{property=properties" + + "/*}:batchRunPivotReports:\001*\022\234\001\n\013GetMetad" + + "ata\0220.google.analytics.data.v1beta.GetMe" + + "tadataRequest\032&.google.analytics.data.v1" + + "beta.Metadata\"3\202\323\344\223\002&\022$/v1beta/{name=pro" + + "perties/*/metadata}\332A\004name\022\302\001\n\021RunRealti" + + "meReport\0226.google.analytics.data.v1beta." + + "RunRealtimeReportRequest\0327.google.analyt" + + "ics.data.v1beta.RunRealtimeReportRespons" + + "e\"<\202\323\344\223\0026\"1/v1beta/{property=properties/" + + "*}:runRealtimeReport:\001*\032~\312A\034analyticsdat" + + "a.googleapis.com\322A\\https://www.googleapi" + + "s.com/auth/analytics,https://www.googlea" + + "pis.com/auth/analytics.readonlyB}\n com.g" + + "oogle.analytics.data.v1betaB\025AnalyticsDa" + + "taApiProtoP\001Z@google.golang.org/genproto" + + "/googleapis/analytics/data/v1beta;datab\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.analytics.data.v1beta.ReportingApiProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_analytics_data_v1beta_Metadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_data_v1beta_Metadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Metadata_descriptor, + new java.lang.String[] { + "Name", "Dimensions", "Metrics", + }); + internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_data_v1beta_RunReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor, + new java.lang.String[] { + "Property", + "Dimensions", + "Metrics", + "DateRanges", + "DimensionFilter", + "MetricFilter", + "PageSize", + "PageToken", + "MetricAggregations", + "OrderBys", + "CurrencyCode", + "CohortSpec", + "KeepEmptyRows", + "ReturnPropertyQuota", + }); + internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_data_v1beta_RunReportResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor, + new java.lang.String[] { + "DimensionHeaders", + "MetricHeaders", + "Rows", + "Totals", + "Maximums", + "Minimums", + "NextPageToken", + "TotalSize", + "Metadata", + "PropertyQuota", + }); + internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_data_v1beta_RunPivotReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor, + new java.lang.String[] { + "Property", + "Dimensions", + "Metrics", + "DateRanges", + "Pivots", + "DimensionFilter", + "MetricFilter", + "CurrencyCode", + "CohortSpec", + "KeepEmptyRows", + "ReturnPropertyQuota", + }); + internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_data_v1beta_RunPivotReportResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor, + new java.lang.String[] { + "PivotHeaders", + "DimensionHeaders", + "MetricHeaders", + "Rows", + "Aggregates", + "Metadata", + "PropertyQuota", + }); + internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor, + new java.lang.String[] { + "Property", "Requests", + }); + internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor, + new java.lang.String[] { + "Reports", + }); + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor, + new java.lang.String[] { + "Property", "Requests", + }); + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor, + new java.lang.String[] { + "PivotReports", + }); + internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_analytics_data_v1beta_GetMetadataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor, + new java.lang.String[] { + "Property", + "Dimensions", + "Metrics", + "DimensionFilter", + "MetricFilter", + "PageSize", + "MetricAggregations", + "OrderBys", + "ReturnPropertyQuota", + }); + internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor, + new java.lang.String[] { + "DimensionHeaders", + "MetricHeaders", + "Rows", + "Totals", + "Maximums", + "Minimums", + "TotalSize", + "PropertyQuota", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.analytics.data.v1beta.ReportingApiProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequest.java new file mode 100644 index 00000000..fd3e5ae2 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequest.java @@ -0,0 +1,1219 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The batch request containing multiple pivot report requests.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunPivotReportsRequest} + */ +public final class BatchRunPivotReportsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.BatchRunPivotReportsRequest) + BatchRunPivotReportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunPivotReportsRequest.newBuilder() to construct. + private BatchRunPivotReportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunPivotReportsRequest() { + property_ = ""; + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunPivotReportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunPivotReportsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = + new java.util.ArrayList< + com.google.analytics.data.v1beta.RunPivotReportRequest>(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage( + com.google.analytics.data.v1beta.RunPivotReportRequest.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.class, + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunPivotReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunPivotReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTS_FIELD_NUMBER = 2; + private java.util.List requests_; + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequest getRequests(int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(2, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.BatchRunPivotReportsRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest other = + (com.google.analytics.data.v1beta.BatchRunPivotReportsRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The batch request containing multiple pivot report requests.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunPivotReportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.BatchRunPivotReportsRequest) + com.google.analytics.data.v1beta.BatchRunPivotReportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.class, + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsRequest + getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsRequest build() { + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsRequest buildPartial() { + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest result = + new com.google.analytics.data.v1beta.BatchRunPivotReportsRequest(this); + int from_bitField0_ = bitField0_; + result.property_ = property_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.BatchRunPivotReportsRequest) { + return mergeFrom((com.google.analytics.data.v1beta.BatchRunPivotReportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.BatchRunPivotReportsRequest other) { + if (other + == com.google.analytics.data.v1beta.BatchRunPivotReportsRequest.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.BatchRunPivotReportsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.BatchRunPivotReportsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunPivotReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunPivotReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunPivotReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunPivotReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunPivotReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List requests_ = + java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = + new java.util.ArrayList( + requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder, + com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public java.util.List + getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunPivotReportRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder setRequests( + int index, com.google.analytics.data.v1beta.RunPivotReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder setRequests( + int index, com.google.analytics.data.v1beta.RunPivotReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder addRequests(com.google.analytics.data.v1beta.RunPivotReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder addRequests( + int index, com.google.analytics.data.v1beta.RunPivotReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder addRequests( + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder addRequests( + int index, com.google.analytics.data.v1beta.RunPivotReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder addAllRequests( + java.lang.Iterable + values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunPivotReportRequest.Builder getRequestsBuilder( + int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunPivotReportRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.RunPivotReportRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunPivotReportRequest.Builder addRequestsBuilder( + int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.RunPivotReportRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Individual requests. Each request has a separate pivot report response.
+     * Each batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder, + com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportRequest, + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder, + com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.BatchRunPivotReportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.BatchRunPivotReportsRequest) + private static final com.google.analytics.data.v1beta.BatchRunPivotReportsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.BatchRunPivotReportsRequest(); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunPivotReportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunPivotReportsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequestOrBuilder.java new file mode 100644 index 00000000..20522666 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface BatchRunPivotReportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.BatchRunPivotReportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunPivotReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunPivotReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + java.util.List getRequestsList(); + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + com.google.analytics.data.v1beta.RunPivotReportRequest getRequests(int index); + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + int getRequestsCount(); + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + java.util.List + getRequestsOrBuilderList(); + /** + * + * + *
+   * Individual requests. Each request has a separate pivot report response.
+   * Each batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportRequest requests = 2; + */ + com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder getRequestsOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponse.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponse.java new file mode 100644 index 00000000..a4f817f2 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponse.java @@ -0,0 +1,974 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The batch response containing multiple pivot reports.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunPivotReportsResponse} + */ +public final class BatchRunPivotReportsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.BatchRunPivotReportsResponse) + BatchRunPivotReportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunPivotReportsResponse.newBuilder() to construct. + private BatchRunPivotReportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunPivotReportsResponse() { + pivotReports_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunPivotReportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunPivotReportsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pivotReports_ = + new java.util.ArrayList< + com.google.analytics.data.v1beta.RunPivotReportResponse>(); + mutable_bitField0_ |= 0x00000001; + } + pivotReports_.add( + input.readMessage( + com.google.analytics.data.v1beta.RunPivotReportResponse.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pivotReports_ = java.util.Collections.unmodifiableList(pivotReports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.class, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.Builder.class); + } + + public static final int PIVOT_REPORTS_FIELD_NUMBER = 1; + private java.util.List pivotReports_; + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + @java.lang.Override + public java.util.List + getPivotReportsList() { + return pivotReports_; + } + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + @java.lang.Override + public java.util.List + getPivotReportsOrBuilderList() { + return pivotReports_; + } + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + @java.lang.Override + public int getPivotReportsCount() { + return pivotReports_.size(); + } + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponse getPivotReports(int index) { + return pivotReports_.get(index); + } + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder getPivotReportsOrBuilder( + int index) { + return pivotReports_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < pivotReports_.size(); i++) { + output.writeMessage(1, pivotReports_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pivotReports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pivotReports_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.BatchRunPivotReportsResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse other = + (com.google.analytics.data.v1beta.BatchRunPivotReportsResponse) obj; + + if (!getPivotReportsList().equals(other.getPivotReportsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPivotReportsCount() > 0) { + hash = (37 * hash) + PIVOT_REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getPivotReportsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The batch response containing multiple pivot reports.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunPivotReportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.BatchRunPivotReportsResponse) + com.google.analytics.data.v1beta.BatchRunPivotReportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.class, + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPivotReportsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pivotReportsBuilder_ == null) { + pivotReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pivotReportsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunPivotReportsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsResponse + getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsResponse build() { + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsResponse buildPartial() { + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse result = + new com.google.analytics.data.v1beta.BatchRunPivotReportsResponse(this); + int from_bitField0_ = bitField0_; + if (pivotReportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pivotReports_ = java.util.Collections.unmodifiableList(pivotReports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pivotReports_ = pivotReports_; + } else { + result.pivotReports_ = pivotReportsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.BatchRunPivotReportsResponse) { + return mergeFrom((com.google.analytics.data.v1beta.BatchRunPivotReportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.BatchRunPivotReportsResponse other) { + if (other + == com.google.analytics.data.v1beta.BatchRunPivotReportsResponse.getDefaultInstance()) + return this; + if (pivotReportsBuilder_ == null) { + if (!other.pivotReports_.isEmpty()) { + if (pivotReports_.isEmpty()) { + pivotReports_ = other.pivotReports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePivotReportsIsMutable(); + pivotReports_.addAll(other.pivotReports_); + } + onChanged(); + } + } else { + if (!other.pivotReports_.isEmpty()) { + if (pivotReportsBuilder_.isEmpty()) { + pivotReportsBuilder_.dispose(); + pivotReportsBuilder_ = null; + pivotReports_ = other.pivotReports_; + bitField0_ = (bitField0_ & ~0x00000001); + pivotReportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPivotReportsFieldBuilder() + : null; + } else { + pivotReportsBuilder_.addAllMessages(other.pivotReports_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.BatchRunPivotReportsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.BatchRunPivotReportsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List pivotReports_ = + java.util.Collections.emptyList(); + + private void ensurePivotReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pivotReports_ = + new java.util.ArrayList( + pivotReports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportResponse, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder, + com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder> + pivotReportsBuilder_; + + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public java.util.List + getPivotReportsList() { + if (pivotReportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pivotReports_); + } else { + return pivotReportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public int getPivotReportsCount() { + if (pivotReportsBuilder_ == null) { + return pivotReports_.size(); + } else { + return pivotReportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public com.google.analytics.data.v1beta.RunPivotReportResponse getPivotReports(int index) { + if (pivotReportsBuilder_ == null) { + return pivotReports_.get(index); + } else { + return pivotReportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder setPivotReports( + int index, com.google.analytics.data.v1beta.RunPivotReportResponse value) { + if (pivotReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotReportsIsMutable(); + pivotReports_.set(index, value); + onChanged(); + } else { + pivotReportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder setPivotReports( + int index, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder builderForValue) { + if (pivotReportsBuilder_ == null) { + ensurePivotReportsIsMutable(); + pivotReports_.set(index, builderForValue.build()); + onChanged(); + } else { + pivotReportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder addPivotReports(com.google.analytics.data.v1beta.RunPivotReportResponse value) { + if (pivotReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotReportsIsMutable(); + pivotReports_.add(value); + onChanged(); + } else { + pivotReportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder addPivotReports( + int index, com.google.analytics.data.v1beta.RunPivotReportResponse value) { + if (pivotReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotReportsIsMutable(); + pivotReports_.add(index, value); + onChanged(); + } else { + pivotReportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder addPivotReports( + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder builderForValue) { + if (pivotReportsBuilder_ == null) { + ensurePivotReportsIsMutable(); + pivotReports_.add(builderForValue.build()); + onChanged(); + } else { + pivotReportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder addPivotReports( + int index, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder builderForValue) { + if (pivotReportsBuilder_ == null) { + ensurePivotReportsIsMutable(); + pivotReports_.add(index, builderForValue.build()); + onChanged(); + } else { + pivotReportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder addAllPivotReports( + java.lang.Iterable + values) { + if (pivotReportsBuilder_ == null) { + ensurePivotReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pivotReports_); + onChanged(); + } else { + pivotReportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder clearPivotReports() { + if (pivotReportsBuilder_ == null) { + pivotReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pivotReportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public Builder removePivotReports(int index) { + if (pivotReportsBuilder_ == null) { + ensurePivotReportsIsMutable(); + pivotReports_.remove(index); + onChanged(); + } else { + pivotReportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public com.google.analytics.data.v1beta.RunPivotReportResponse.Builder getPivotReportsBuilder( + int index) { + return getPivotReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder + getPivotReportsOrBuilder(int index) { + if (pivotReportsBuilder_ == null) { + return pivotReports_.get(index); + } else { + return pivotReportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public java.util.List< + ? extends com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder> + getPivotReportsOrBuilderList() { + if (pivotReportsBuilder_ != null) { + return pivotReportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pivotReports_); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public com.google.analytics.data.v1beta.RunPivotReportResponse.Builder + addPivotReportsBuilder() { + return getPivotReportsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.RunPivotReportResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public com.google.analytics.data.v1beta.RunPivotReportResponse.Builder addPivotReportsBuilder( + int index) { + return getPivotReportsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.RunPivotReportResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Individual responses. Each response has a separate pivot report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + public java.util.List + getPivotReportsBuilderList() { + return getPivotReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportResponse, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder, + com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder> + getPivotReportsFieldBuilder() { + if (pivotReportsBuilder_ == null) { + pivotReportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunPivotReportResponse, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder, + com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder>( + pivotReports_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pivotReports_ = null; + } + return pivotReportsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.BatchRunPivotReportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.BatchRunPivotReportsResponse) + private static final com.google.analytics.data.v1beta.BatchRunPivotReportsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.BatchRunPivotReportsResponse(); + } + + public static com.google.analytics.data.v1beta.BatchRunPivotReportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunPivotReportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunPivotReportsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunPivotReportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponseOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponseOrBuilder.java new file mode 100644 index 00000000..5f205584 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponseOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface BatchRunPivotReportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.BatchRunPivotReportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + java.util.List getPivotReportsList(); + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + com.google.analytics.data.v1beta.RunPivotReportResponse getPivotReports(int index); + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + int getPivotReportsCount(); + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + java.util.List + getPivotReportsOrBuilderList(); + /** + * + * + *
+   * Individual responses. Each response has a separate pivot report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunPivotReportResponse pivot_reports = 1; + */ + com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder getPivotReportsOrBuilder( + int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequest.java new file mode 100644 index 00000000..afe702f1 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequest.java @@ -0,0 +1,1208 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The batch request containing multiple report requests.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunReportsRequest} + */ +public final class BatchRunReportsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.BatchRunReportsRequest) + BatchRunReportsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunReportsRequest.newBuilder() to construct. + private BatchRunReportsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunReportsRequest() { + property_ = ""; + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunReportsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunReportsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage( + com.google.analytics.data.v1beta.RunReportRequest.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunReportsRequest.class, + com.google.analytics.data.v1beta.BatchRunReportsRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTS_FIELD_NUMBER = 2; + private java.util.List requests_; + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + @java.lang.Override + public java.util.List getRequestsList() { + return requests_; + } + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + @java.lang.Override + public java.util.List + getRequestsOrBuilderList() { + return requests_; + } + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + @java.lang.Override + public int getRequestsCount() { + return requests_.size(); + } + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequest getRequests(int index) { + return requests_.get(index); + } + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequestOrBuilder getRequestsOrBuilder( + int index) { + return requests_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + for (int i = 0; i < requests_.size(); i++) { + output.writeMessage(2, requests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + for (int i = 0; i < requests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, requests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.BatchRunReportsRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.BatchRunReportsRequest other = + (com.google.analytics.data.v1beta.BatchRunReportsRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getRequestsCount() > 0) { + hash = (37 * hash) + REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getRequestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.BatchRunReportsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The batch request containing multiple report requests.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunReportsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.BatchRunReportsRequest) + com.google.analytics.data.v1beta.BatchRunReportsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunReportsRequest.class, + com.google.analytics.data.v1beta.BatchRunReportsRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.BatchRunReportsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRequestsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + requestsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.BatchRunReportsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsRequest build() { + com.google.analytics.data.v1beta.BatchRunReportsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsRequest buildPartial() { + com.google.analytics.data.v1beta.BatchRunReportsRequest result = + new com.google.analytics.data.v1beta.BatchRunReportsRequest(this); + int from_bitField0_ = bitField0_; + result.property_ = property_; + if (requestsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requests_ = requests_; + } else { + result.requests_ = requestsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.BatchRunReportsRequest) { + return mergeFrom((com.google.analytics.data.v1beta.BatchRunReportsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.BatchRunReportsRequest other) { + if (other == com.google.analytics.data.v1beta.BatchRunReportsRequest.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (requestsBuilder_ == null) { + if (!other.requests_.isEmpty()) { + if (requests_.isEmpty()) { + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequestsIsMutable(); + requests_.addAll(other.requests_); + } + onChanged(); + } + } else { + if (!other.requests_.isEmpty()) { + if (requestsBuilder_.isEmpty()) { + requestsBuilder_.dispose(); + requestsBuilder_ = null; + requests_ = other.requests_; + bitField0_ = (bitField0_ & ~0x00000001); + requestsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRequestsFieldBuilder() + : null; + } else { + requestsBuilder_.addAllMessages(other.requests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.BatchRunReportsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.BatchRunReportsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * This property must be specified for the batch. The property within
+     * RunReportRequest may either be unspecified or consistent with this
+     * property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List requests_ = + java.util.Collections.emptyList(); + + private void ensureRequestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requests_ = + new java.util.ArrayList(requests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportRequest.Builder, + com.google.analytics.data.v1beta.RunReportRequestOrBuilder> + requestsBuilder_; + + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public java.util.List getRequestsList() { + if (requestsBuilder_ == null) { + return java.util.Collections.unmodifiableList(requests_); + } else { + return requestsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public int getRequestsCount() { + if (requestsBuilder_ == null) { + return requests_.size(); + } else { + return requestsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunReportRequest getRequests(int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder setRequests(int index, com.google.analytics.data.v1beta.RunReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.set(index, value); + onChanged(); + } else { + requestsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder setRequests( + int index, com.google.analytics.data.v1beta.RunReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.set(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder addRequests(com.google.analytics.data.v1beta.RunReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(value); + onChanged(); + } else { + requestsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder addRequests(int index, com.google.analytics.data.v1beta.RunReportRequest value) { + if (requestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequestsIsMutable(); + requests_.add(index, value); + onChanged(); + } else { + requestsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder addRequests( + com.google.analytics.data.v1beta.RunReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder addRequests( + int index, com.google.analytics.data.v1beta.RunReportRequest.Builder builderForValue) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(index, builderForValue.build()); + onChanged(); + } else { + requestsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder addAllRequests( + java.lang.Iterable values) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_); + onChanged(); + } else { + requestsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder clearRequests() { + if (requestsBuilder_ == null) { + requests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + requestsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public Builder removeRequests(int index) { + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.remove(index); + onChanged(); + } else { + requestsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunReportRequest.Builder getRequestsBuilder(int index) { + return getRequestsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunReportRequestOrBuilder getRequestsOrBuilder( + int index) { + if (requestsBuilder_ == null) { + return requests_.get(index); + } else { + return requestsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public java.util.List + getRequestsOrBuilderList() { + if (requestsBuilder_ != null) { + return requestsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(requests_); + } + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunReportRequest.Builder addRequestsBuilder() { + return getRequestsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.RunReportRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public com.google.analytics.data.v1beta.RunReportRequest.Builder addRequestsBuilder(int index) { + return getRequestsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.RunReportRequest.getDefaultInstance()); + } + /** + * + * + *
+     * Individual requests. Each request has a separate report response. Each
+     * batch request is allowed up to 5 requests.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + public java.util.List + getRequestsBuilderList() { + return getRequestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportRequest.Builder, + com.google.analytics.data.v1beta.RunReportRequestOrBuilder> + getRequestsFieldBuilder() { + if (requestsBuilder_ == null) { + requestsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportRequest, + com.google.analytics.data.v1beta.RunReportRequest.Builder, + com.google.analytics.data.v1beta.RunReportRequestOrBuilder>( + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + requests_ = null; + } + return requestsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.BatchRunReportsRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.BatchRunReportsRequest) + private static final com.google.analytics.data.v1beta.BatchRunReportsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.BatchRunReportsRequest(); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunReportsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunReportsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequestOrBuilder.java new file mode 100644 index 00000000..636115b7 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface BatchRunReportsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.BatchRunReportsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * This property must be specified for the batch. The property within
+   * RunReportRequest may either be unspecified or consistent with this
+   * property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + java.util.List getRequestsList(); + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + com.google.analytics.data.v1beta.RunReportRequest getRequests(int index); + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + int getRequestsCount(); + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + java.util.List + getRequestsOrBuilderList(); + /** + * + * + *
+   * Individual requests. Each request has a separate report response. Each
+   * batch request is allowed up to 5 requests.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportRequest requests = 2; + */ + com.google.analytics.data.v1beta.RunReportRequestOrBuilder getRequestsOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponse.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponse.java new file mode 100644 index 00000000..9af281f3 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponse.java @@ -0,0 +1,957 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The batch response containing multiple reports.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunReportsResponse} + */ +public final class BatchRunReportsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.BatchRunReportsResponse) + BatchRunReportsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRunReportsResponse.newBuilder() to construct. + private BatchRunReportsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRunReportsResponse() { + reports_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRunReportsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BatchRunReportsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + reports_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + reports_.add( + input.readMessage( + com.google.analytics.data.v1beta.RunReportResponse.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + reports_ = java.util.Collections.unmodifiableList(reports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunReportsResponse.class, + com.google.analytics.data.v1beta.BatchRunReportsResponse.Builder.class); + } + + public static final int REPORTS_FIELD_NUMBER = 1; + private java.util.List reports_; + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + @java.lang.Override + public java.util.List getReportsList() { + return reports_; + } + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + @java.lang.Override + public java.util.List + getReportsOrBuilderList() { + return reports_; + } + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + @java.lang.Override + public int getReportsCount() { + return reports_.size(); + } + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponse getReports(int index) { + return reports_.get(index); + } + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponseOrBuilder getReportsOrBuilder( + int index) { + return reports_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < reports_.size(); i++) { + output.writeMessage(1, reports_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < reports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, reports_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.BatchRunReportsResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.BatchRunReportsResponse other = + (com.google.analytics.data.v1beta.BatchRunReportsResponse) obj; + + if (!getReportsList().equals(other.getReportsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getReportsCount() > 0) { + hash = (37 * hash) + REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getReportsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.BatchRunReportsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The batch response containing multiple reports.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.BatchRunReportsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.BatchRunReportsResponse) + com.google.analytics.data.v1beta.BatchRunReportsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.BatchRunReportsResponse.class, + com.google.analytics.data.v1beta.BatchRunReportsResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.BatchRunReportsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReportsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (reportsBuilder_ == null) { + reports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + reportsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_BatchRunReportsResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsResponse getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.BatchRunReportsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsResponse build() { + com.google.analytics.data.v1beta.BatchRunReportsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsResponse buildPartial() { + com.google.analytics.data.v1beta.BatchRunReportsResponse result = + new com.google.analytics.data.v1beta.BatchRunReportsResponse(this); + int from_bitField0_ = bitField0_; + if (reportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + reports_ = java.util.Collections.unmodifiableList(reports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.reports_ = reports_; + } else { + result.reports_ = reportsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.BatchRunReportsResponse) { + return mergeFrom((com.google.analytics.data.v1beta.BatchRunReportsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.BatchRunReportsResponse other) { + if (other == com.google.analytics.data.v1beta.BatchRunReportsResponse.getDefaultInstance()) + return this; + if (reportsBuilder_ == null) { + if (!other.reports_.isEmpty()) { + if (reports_.isEmpty()) { + reports_ = other.reports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReportsIsMutable(); + reports_.addAll(other.reports_); + } + onChanged(); + } + } else { + if (!other.reports_.isEmpty()) { + if (reportsBuilder_.isEmpty()) { + reportsBuilder_.dispose(); + reportsBuilder_ = null; + reports_ = other.reports_; + bitField0_ = (bitField0_ & ~0x00000001); + reportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReportsFieldBuilder() + : null; + } else { + reportsBuilder_.addAllMessages(other.reports_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.BatchRunReportsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.BatchRunReportsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List reports_ = + java.util.Collections.emptyList(); + + private void ensureReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + reports_ = + new java.util.ArrayList(reports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportResponse, + com.google.analytics.data.v1beta.RunReportResponse.Builder, + com.google.analytics.data.v1beta.RunReportResponseOrBuilder> + reportsBuilder_; + + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public java.util.List getReportsList() { + if (reportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(reports_); + } else { + return reportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public int getReportsCount() { + if (reportsBuilder_ == null) { + return reports_.size(); + } else { + return reportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public com.google.analytics.data.v1beta.RunReportResponse getReports(int index) { + if (reportsBuilder_ == null) { + return reports_.get(index); + } else { + return reportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder setReports(int index, com.google.analytics.data.v1beta.RunReportResponse value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.set(index, value); + onChanged(); + } else { + reportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder setReports( + int index, com.google.analytics.data.v1beta.RunReportResponse.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.set(index, builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder addReports(com.google.analytics.data.v1beta.RunReportResponse value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.add(value); + onChanged(); + } else { + reportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder addReports(int index, com.google.analytics.data.v1beta.RunReportResponse value) { + if (reportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReportsIsMutable(); + reports_.add(index, value); + onChanged(); + } else { + reportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder addReports( + com.google.analytics.data.v1beta.RunReportResponse.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.add(builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder addReports( + int index, com.google.analytics.data.v1beta.RunReportResponse.Builder builderForValue) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.add(index, builderForValue.build()); + onChanged(); + } else { + reportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder addAllReports( + java.lang.Iterable values) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reports_); + onChanged(); + } else { + reportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder clearReports() { + if (reportsBuilder_ == null) { + reports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + reportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public Builder removeReports(int index) { + if (reportsBuilder_ == null) { + ensureReportsIsMutable(); + reports_.remove(index); + onChanged(); + } else { + reportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public com.google.analytics.data.v1beta.RunReportResponse.Builder getReportsBuilder(int index) { + return getReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public com.google.analytics.data.v1beta.RunReportResponseOrBuilder getReportsOrBuilder( + int index) { + if (reportsBuilder_ == null) { + return reports_.get(index); + } else { + return reportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public java.util.List + getReportsOrBuilderList() { + if (reportsBuilder_ != null) { + return reportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(reports_); + } + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public com.google.analytics.data.v1beta.RunReportResponse.Builder addReportsBuilder() { + return getReportsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.RunReportResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public com.google.analytics.data.v1beta.RunReportResponse.Builder addReportsBuilder(int index) { + return getReportsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.RunReportResponse.getDefaultInstance()); + } + /** + * + * + *
+     * Individual responses. Each response has a separate report request.
+     * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + public java.util.List + getReportsBuilderList() { + return getReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportResponse, + com.google.analytics.data.v1beta.RunReportResponse.Builder, + com.google.analytics.data.v1beta.RunReportResponseOrBuilder> + getReportsFieldBuilder() { + if (reportsBuilder_ == null) { + reportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.RunReportResponse, + com.google.analytics.data.v1beta.RunReportResponse.Builder, + com.google.analytics.data.v1beta.RunReportResponseOrBuilder>( + reports_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + reports_ = null; + } + return reportsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.BatchRunReportsResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.BatchRunReportsResponse) + private static final com.google.analytics.data.v1beta.BatchRunReportsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.BatchRunReportsResponse(); + } + + public static com.google.analytics.data.v1beta.BatchRunReportsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRunReportsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BatchRunReportsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.BatchRunReportsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponseOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponseOrBuilder.java new file mode 100644 index 00000000..b86e22ce --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface BatchRunReportsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.BatchRunReportsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + java.util.List getReportsList(); + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + com.google.analytics.data.v1beta.RunReportResponse getReports(int index); + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + int getReportsCount(); + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + java.util.List + getReportsOrBuilderList(); + /** + * + * + *
+   * Individual responses. Each response has a separate report request.
+   * 
+ * + * repeated .google.analytics.data.v1beta.RunReportResponse reports = 1; + */ + com.google.analytics.data.v1beta.RunReportResponseOrBuilder getReportsOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Cohort.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Cohort.java new file mode 100644 index 00000000..47ce0c7f --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Cohort.java @@ -0,0 +1,1278 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Defines a cohort selection criteria. A cohort is a group of users who share
+ * a common characteristic. For example, users with the same `firstSessionDate`
+ * belong to the same cohort.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Cohort} + */ +public final class Cohort extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Cohort) + CohortOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cohort.newBuilder() to construct. + private Cohort(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cohort() { + name_ = ""; + dimension_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Cohort(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Cohort( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + dimension_ = s; + break; + } + case 26: + { + com.google.analytics.data.v1beta.DateRange.Builder subBuilder = null; + if (dateRange_ != null) { + subBuilder = dateRange_.toBuilder(); + } + dateRange_ = + input.readMessage( + com.google.analytics.data.v1beta.DateRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dateRange_); + dateRange_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Cohort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Cohort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Cohort.class, + com.google.analytics.data.v1beta.Cohort.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Assigns a name to this cohort. The dimension `cohort` is valued to this
+   * name in a report response. If set, cannot begin with `cohort_` or
+   * `RESERVED_`. If not set, cohorts are named by their zero based index
+   * `cohort_0`, `cohort_1`, etc.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Assigns a name to this cohort. The dimension `cohort` is valued to this
+   * name in a report response. If set, cannot begin with `cohort_` or
+   * `RESERVED_`. If not set, cohorts are named by their zero based index
+   * `cohort_0`, `cohort_1`, etc.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSION_FIELD_NUMBER = 2; + private volatile java.lang.Object dimension_; + /** + * + * + *
+   * Dimension used by the cohort. Required and only supports
+   * `firstSessionDate`.
+   * 
+ * + * string dimension = 2; + * + * @return The dimension. + */ + @java.lang.Override + public java.lang.String getDimension() { + java.lang.Object ref = dimension_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimension_ = s; + return s; + } + } + /** + * + * + *
+   * Dimension used by the cohort. Required and only supports
+   * `firstSessionDate`.
+   * 
+ * + * string dimension = 2; + * + * @return The bytes for dimension. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionBytes() { + java.lang.Object ref = dimension_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATE_RANGE_FIELD_NUMBER = 3; + private com.google.analytics.data.v1beta.DateRange dateRange_; + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return Whether the dateRange field is set. + */ + @java.lang.Override + public boolean hasDateRange() { + return dateRange_ != null; + } + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return The dateRange. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange getDateRange() { + return dateRange_ == null + ? com.google.analytics.data.v1beta.DateRange.getDefaultInstance() + : dateRange_; + } + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangeOrBuilder() { + return getDateRange(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDimensionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dimension_); + } + if (dateRange_ != null) { + output.writeMessage(3, getDateRange()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDimensionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dimension_); + } + if (dateRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDateRange()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Cohort)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Cohort other = (com.google.analytics.data.v1beta.Cohort) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDimension().equals(other.getDimension())) return false; + if (hasDateRange() != other.hasDateRange()) return false; + if (hasDateRange()) { + if (!getDateRange().equals(other.getDateRange())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getDimension().hashCode(); + if (hasDateRange()) { + hash = (37 * hash) + DATE_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getDateRange().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Cohort parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Cohort parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Cohort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Cohort prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines a cohort selection criteria. A cohort is a group of users who share
+   * a common characteristic. For example, users with the same `firstSessionDate`
+   * belong to the same cohort.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Cohort} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Cohort) + com.google.analytics.data.v1beta.CohortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Cohort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Cohort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Cohort.class, + com.google.analytics.data.v1beta.Cohort.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Cohort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + dimension_ = ""; + + if (dateRangeBuilder_ == null) { + dateRange_ = null; + } else { + dateRange_ = null; + dateRangeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Cohort_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Cohort getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Cohort.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Cohort build() { + com.google.analytics.data.v1beta.Cohort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Cohort buildPartial() { + com.google.analytics.data.v1beta.Cohort result = + new com.google.analytics.data.v1beta.Cohort(this); + result.name_ = name_; + result.dimension_ = dimension_; + if (dateRangeBuilder_ == null) { + result.dateRange_ = dateRange_; + } else { + result.dateRange_ = dateRangeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Cohort) { + return mergeFrom((com.google.analytics.data.v1beta.Cohort) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Cohort other) { + if (other == com.google.analytics.data.v1beta.Cohort.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDimension().isEmpty()) { + dimension_ = other.dimension_; + onChanged(); + } + if (other.hasDateRange()) { + mergeDateRange(other.getDateRange()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Cohort parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Cohort) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Assigns a name to this cohort. The dimension `cohort` is valued to this
+     * name in a report response. If set, cannot begin with `cohort_` or
+     * `RESERVED_`. If not set, cohorts are named by their zero based index
+     * `cohort_0`, `cohort_1`, etc.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Assigns a name to this cohort. The dimension `cohort` is valued to this
+     * name in a report response. If set, cannot begin with `cohort_` or
+     * `RESERVED_`. If not set, cohorts are named by their zero based index
+     * `cohort_0`, `cohort_1`, etc.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Assigns a name to this cohort. The dimension `cohort` is valued to this
+     * name in a report response. If set, cannot begin with `cohort_` or
+     * `RESERVED_`. If not set, cohorts are named by their zero based index
+     * `cohort_0`, `cohort_1`, etc.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Assigns a name to this cohort. The dimension `cohort` is valued to this
+     * name in a report response. If set, cannot begin with `cohort_` or
+     * `RESERVED_`. If not set, cohorts are named by their zero based index
+     * `cohort_0`, `cohort_1`, etc.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Assigns a name to this cohort. The dimension `cohort` is valued to this
+     * name in a report response. If set, cannot begin with `cohort_` or
+     * `RESERVED_`. If not set, cohorts are named by their zero based index
+     * `cohort_0`, `cohort_1`, etc.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object dimension_ = ""; + /** + * + * + *
+     * Dimension used by the cohort. Required and only supports
+     * `firstSessionDate`.
+     * 
+ * + * string dimension = 2; + * + * @return The dimension. + */ + public java.lang.String getDimension() { + java.lang.Object ref = dimension_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimension_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Dimension used by the cohort. Required and only supports
+     * `firstSessionDate`.
+     * 
+ * + * string dimension = 2; + * + * @return The bytes for dimension. + */ + public com.google.protobuf.ByteString getDimensionBytes() { + java.lang.Object ref = dimension_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Dimension used by the cohort. Required and only supports
+     * `firstSessionDate`.
+     * 
+ * + * string dimension = 2; + * + * @param value The dimension to set. + * @return This builder for chaining. + */ + public Builder setDimension(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimension_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension used by the cohort. Required and only supports
+     * `firstSessionDate`.
+     * 
+ * + * string dimension = 2; + * + * @return This builder for chaining. + */ + public Builder clearDimension() { + + dimension_ = getDefaultInstance().getDimension(); + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension used by the cohort. Required and only supports
+     * `firstSessionDate`.
+     * 
+ * + * string dimension = 2; + * + * @param value The bytes for dimension to set. + * @return This builder for chaining. + */ + public Builder setDimensionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimension_ = value; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.DateRange dateRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + dateRangeBuilder_; + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return Whether the dateRange field is set. + */ + public boolean hasDateRange() { + return dateRangeBuilder_ != null || dateRange_ != null; + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return The dateRange. + */ + public com.google.analytics.data.v1beta.DateRange getDateRange() { + if (dateRangeBuilder_ == null) { + return dateRange_ == null + ? com.google.analytics.data.v1beta.DateRange.getDefaultInstance() + : dateRange_; + } else { + return dateRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public Builder setDateRange(com.google.analytics.data.v1beta.DateRange value) { + if (dateRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dateRange_ = value; + onChanged(); + } else { + dateRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public Builder setDateRange( + com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangeBuilder_ == null) { + dateRange_ = builderForValue.build(); + onChanged(); + } else { + dateRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public Builder mergeDateRange(com.google.analytics.data.v1beta.DateRange value) { + if (dateRangeBuilder_ == null) { + if (dateRange_ != null) { + dateRange_ = + com.google.analytics.data.v1beta.DateRange.newBuilder(dateRange_) + .mergeFrom(value) + .buildPartial(); + } else { + dateRange_ = value; + } + onChanged(); + } else { + dateRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public Builder clearDateRange() { + if (dateRangeBuilder_ == null) { + dateRange_ = null; + onChanged(); + } else { + dateRange_ = null; + dateRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public com.google.analytics.data.v1beta.DateRange.Builder getDateRangeBuilder() { + + onChanged(); + return getDateRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangeOrBuilder() { + if (dateRangeBuilder_ != null) { + return dateRangeBuilder_.getMessageOrBuilder(); + } else { + return dateRange_ == null + ? com.google.analytics.data.v1beta.DateRange.getDefaultInstance() + : dateRange_; + } + } + /** + * + * + *
+     * The cohort selects users whose first touch date is between start date and
+     * end date defined in the `dateRange`. This `dateRange` does not specify the
+     * full date range of event data that is present in a cohort report. In a
+     * cohort report, this `dateRange` is extended by the granularity and offset
+     * present in the `cohortsRange`; event data for the extended reporting date
+     * range is present in a cohort report.
+     * In a cohort request, this `dateRange` is required and the `dateRanges` in
+     * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+     * This `dateRange` should generally be aligned with the cohort's granularity.
+     * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+     * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+     * aligned to a week boundary, starting at Sunday and ending Saturday. If
+     * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+     * a month, starting at the first and ending on the last day of the month.
+     * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + getDateRangeFieldBuilder() { + if (dateRangeBuilder_ == null) { + dateRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder>( + getDateRange(), getParentForChildren(), isClean()); + dateRange_ = null; + } + return dateRangeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Cohort) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Cohort) + private static final com.google.analytics.data.v1beta.Cohort DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Cohort(); + } + + public static com.google.analytics.data.v1beta.Cohort getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cohort parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Cohort(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Cohort getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortOrBuilder.java new file mode 100644 index 00000000..90348f44 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface CohortOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Cohort) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Assigns a name to this cohort. The dimension `cohort` is valued to this
+   * name in a report response. If set, cannot begin with `cohort_` or
+   * `RESERVED_`. If not set, cohorts are named by their zero based index
+   * `cohort_0`, `cohort_1`, etc.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Assigns a name to this cohort. The dimension `cohort` is valued to this
+   * name in a report response. If set, cannot begin with `cohort_` or
+   * `RESERVED_`. If not set, cohorts are named by their zero based index
+   * `cohort_0`, `cohort_1`, etc.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Dimension used by the cohort. Required and only supports
+   * `firstSessionDate`.
+   * 
+ * + * string dimension = 2; + * + * @return The dimension. + */ + java.lang.String getDimension(); + /** + * + * + *
+   * Dimension used by the cohort. Required and only supports
+   * `firstSessionDate`.
+   * 
+ * + * string dimension = 2; + * + * @return The bytes for dimension. + */ + com.google.protobuf.ByteString getDimensionBytes(); + + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return Whether the dateRange field is set. + */ + boolean hasDateRange(); + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + * + * @return The dateRange. + */ + com.google.analytics.data.v1beta.DateRange getDateRange(); + /** + * + * + *
+   * The cohort selects users whose first touch date is between start date and
+   * end date defined in the `dateRange`. This `dateRange` does not specify the
+   * full date range of event data that is present in a cohort report. In a
+   * cohort report, this `dateRange` is extended by the granularity and offset
+   * present in the `cohortsRange`; event data for the extended reporting date
+   * range is present in a cohort report.
+   * In a cohort request, this `dateRange` is required and the `dateRanges` in
+   * the `RunReportRequest` or `RunPivotReportRequest` must be unspecified.
+   * This `dateRange` should generally be aligned with the cohort's granularity.
+   * If `CohortsRange` uses daily granularity, this `dateRange` can be a single
+   * day. If `CohortsRange` uses weekly granularity, this `dateRange` can be
+   * aligned to a week boundary, starting at Sunday and ending Saturday. If
+   * `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to
+   * a month, starting at the first and ending on the last day of the month.
+   * 
+ * + * .google.analytics.data.v1beta.DateRange date_range = 3; + */ + com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangeOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettings.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettings.java new file mode 100644 index 00000000..a7be7e46 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettings.java @@ -0,0 +1,551 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Optional settings of a cohort report.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortReportSettings} + */ +public final class CohortReportSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.CohortReportSettings) + CohortReportSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CohortReportSettings.newBuilder() to construct. + private CohortReportSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CohortReportSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CohortReportSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CohortReportSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + accumulate_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortReportSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortReportSettings.class, + com.google.analytics.data.v1beta.CohortReportSettings.Builder.class); + } + + public static final int ACCUMULATE_FIELD_NUMBER = 1; + private boolean accumulate_; + /** + * + * + *
+   * If true, accumulates the result from first touch day to the end day. Not
+   * supported in `RunReportRequest`.
+   * 
+ * + * bool accumulate = 1; + * + * @return The accumulate. + */ + @java.lang.Override + public boolean getAccumulate() { + return accumulate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (accumulate_ != false) { + output.writeBool(1, accumulate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (accumulate_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, accumulate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.CohortReportSettings)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.CohortReportSettings other = + (com.google.analytics.data.v1beta.CohortReportSettings) obj; + + if (getAccumulate() != other.getAccumulate()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCUMULATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAccumulate()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.CohortReportSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Optional settings of a cohort report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortReportSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.CohortReportSettings) + com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortReportSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortReportSettings.class, + com.google.analytics.data.v1beta.CohortReportSettings.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.CohortReportSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + accumulate_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettings getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.CohortReportSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettings build() { + com.google.analytics.data.v1beta.CohortReportSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettings buildPartial() { + com.google.analytics.data.v1beta.CohortReportSettings result = + new com.google.analytics.data.v1beta.CohortReportSettings(this); + result.accumulate_ = accumulate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.CohortReportSettings) { + return mergeFrom((com.google.analytics.data.v1beta.CohortReportSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.CohortReportSettings other) { + if (other == com.google.analytics.data.v1beta.CohortReportSettings.getDefaultInstance()) + return this; + if (other.getAccumulate() != false) { + setAccumulate(other.getAccumulate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.CohortReportSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.CohortReportSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean accumulate_; + /** + * + * + *
+     * If true, accumulates the result from first touch day to the end day. Not
+     * supported in `RunReportRequest`.
+     * 
+ * + * bool accumulate = 1; + * + * @return The accumulate. + */ + @java.lang.Override + public boolean getAccumulate() { + return accumulate_; + } + /** + * + * + *
+     * If true, accumulates the result from first touch day to the end day. Not
+     * supported in `RunReportRequest`.
+     * 
+ * + * bool accumulate = 1; + * + * @param value The accumulate to set. + * @return This builder for chaining. + */ + public Builder setAccumulate(boolean value) { + + accumulate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, accumulates the result from first touch day to the end day. Not
+     * supported in `RunReportRequest`.
+     * 
+ * + * bool accumulate = 1; + * + * @return This builder for chaining. + */ + public Builder clearAccumulate() { + + accumulate_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.CohortReportSettings) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.CohortReportSettings) + private static final com.google.analytics.data.v1beta.CohortReportSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.CohortReportSettings(); + } + + public static com.google.analytics.data.v1beta.CohortReportSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CohortReportSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CohortReportSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettingsOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettingsOrBuilder.java new file mode 100644 index 00000000..fb5b56a0 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettingsOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface CohortReportSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.CohortReportSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If true, accumulates the result from first touch day to the end day. Not
+   * supported in `RunReportRequest`.
+   * 
+ * + * bool accumulate = 1; + * + * @return The accumulate. + */ + boolean getAccumulate(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpec.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpec.java new file mode 100644 index 00000000..85ac27e7 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpec.java @@ -0,0 +1,1592 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The specification of cohorts for a cohort report.
+ * Cohort reports create a time series of user retention for the cohort. For
+ * example, you could select the cohort of users that were acquired in the first
+ * week of September and follow that cohort for the next six weeks. Selecting
+ * the users acquired in the first week of September cohort is specified in the
+ * `cohort` object. Following that cohort for the next six weeks is specified in
+ * the `cohortsRange` object.
+ * For examples, see [Cohort Report
+ * Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples).
+ * The report response could show a weekly time series where say your app has
+ * retained 60% of this cohort after three weeks and 25% of this cohort after
+ * six weeks. These two percentages can be calculated by the metric
+ * `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortSpec} + */ +public final class CohortSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.CohortSpec) + CohortSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use CohortSpec.newBuilder() to construct. + private CohortSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CohortSpec() { + cohorts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CohortSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CohortSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + cohorts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + cohorts_.add( + input.readMessage( + com.google.analytics.data.v1beta.Cohort.parser(), extensionRegistry)); + break; + } + case 18: + { + com.google.analytics.data.v1beta.CohortsRange.Builder subBuilder = null; + if (cohortsRange_ != null) { + subBuilder = cohortsRange_.toBuilder(); + } + cohortsRange_ = + input.readMessage( + com.google.analytics.data.v1beta.CohortsRange.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cohortsRange_); + cohortsRange_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.analytics.data.v1beta.CohortReportSettings.Builder subBuilder = null; + if (cohortReportSettings_ != null) { + subBuilder = cohortReportSettings_.toBuilder(); + } + cohortReportSettings_ = + input.readMessage( + com.google.analytics.data.v1beta.CohortReportSettings.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cohortReportSettings_); + cohortReportSettings_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + cohorts_ = java.util.Collections.unmodifiableList(cohorts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortSpec.class, + com.google.analytics.data.v1beta.CohortSpec.Builder.class); + } + + public static final int COHORTS_FIELD_NUMBER = 1; + private java.util.List cohorts_; + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + @java.lang.Override + public java.util.List getCohortsList() { + return cohorts_; + } + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + @java.lang.Override + public java.util.List + getCohortsOrBuilderList() { + return cohorts_; + } + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + @java.lang.Override + public int getCohortsCount() { + return cohorts_.size(); + } + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Cohort getCohorts(int index) { + return cohorts_.get(index); + } + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortOrBuilder getCohortsOrBuilder(int index) { + return cohorts_.get(index); + } + + public static final int COHORTS_RANGE_FIELD_NUMBER = 2; + private com.google.analytics.data.v1beta.CohortsRange cohortsRange_; + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return Whether the cohortsRange field is set. + */ + @java.lang.Override + public boolean hasCohortsRange() { + return cohortsRange_ != null; + } + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return The cohortsRange. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange getCohortsRange() { + return cohortsRange_ == null + ? com.google.analytics.data.v1beta.CohortsRange.getDefaultInstance() + : cohortsRange_; + } + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRangeOrBuilder getCohortsRangeOrBuilder() { + return getCohortsRange(); + } + + public static final int COHORT_REPORT_SETTINGS_FIELD_NUMBER = 3; + private com.google.analytics.data.v1beta.CohortReportSettings cohortReportSettings_; + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return Whether the cohortReportSettings field is set. + */ + @java.lang.Override + public boolean hasCohortReportSettings() { + return cohortReportSettings_ != null; + } + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return The cohortReportSettings. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettings getCohortReportSettings() { + return cohortReportSettings_ == null + ? com.google.analytics.data.v1beta.CohortReportSettings.getDefaultInstance() + : cohortReportSettings_; + } + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder + getCohortReportSettingsOrBuilder() { + return getCohortReportSettings(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < cohorts_.size(); i++) { + output.writeMessage(1, cohorts_.get(i)); + } + if (cohortsRange_ != null) { + output.writeMessage(2, getCohortsRange()); + } + if (cohortReportSettings_ != null) { + output.writeMessage(3, getCohortReportSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cohorts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cohorts_.get(i)); + } + if (cohortsRange_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCohortsRange()); + } + if (cohortReportSettings_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCohortReportSettings()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.CohortSpec)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.CohortSpec other = + (com.google.analytics.data.v1beta.CohortSpec) obj; + + if (!getCohortsList().equals(other.getCohortsList())) return false; + if (hasCohortsRange() != other.hasCohortsRange()) return false; + if (hasCohortsRange()) { + if (!getCohortsRange().equals(other.getCohortsRange())) return false; + } + if (hasCohortReportSettings() != other.hasCohortReportSettings()) return false; + if (hasCohortReportSettings()) { + if (!getCohortReportSettings().equals(other.getCohortReportSettings())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCohortsCount() > 0) { + hash = (37 * hash) + COHORTS_FIELD_NUMBER; + hash = (53 * hash) + getCohortsList().hashCode(); + } + if (hasCohortsRange()) { + hash = (37 * hash) + COHORTS_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCohortsRange().hashCode(); + } + if (hasCohortReportSettings()) { + hash = (37 * hash) + COHORT_REPORT_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getCohortReportSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.CohortSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The specification of cohorts for a cohort report.
+   * Cohort reports create a time series of user retention for the cohort. For
+   * example, you could select the cohort of users that were acquired in the first
+   * week of September and follow that cohort for the next six weeks. Selecting
+   * the users acquired in the first week of September cohort is specified in the
+   * `cohort` object. Following that cohort for the next six weeks is specified in
+   * the `cohortsRange` object.
+   * For examples, see [Cohort Report
+   * Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples).
+   * The report response could show a weekly time series where say your app has
+   * retained 60% of this cohort after three weeks and 25% of this cohort after
+   * six weeks. These two percentages can be calculated by the metric
+   * `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.CohortSpec) + com.google.analytics.data.v1beta.CohortSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortSpec.class, + com.google.analytics.data.v1beta.CohortSpec.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.CohortSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCohortsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (cohortsBuilder_ == null) { + cohorts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cohortsBuilder_.clear(); + } + if (cohortsRangeBuilder_ == null) { + cohortsRange_ = null; + } else { + cohortsRange_ = null; + cohortsRangeBuilder_ = null; + } + if (cohortReportSettingsBuilder_ == null) { + cohortReportSettings_ = null; + } else { + cohortReportSettings_ = null; + cohortReportSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortSpec_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec build() { + com.google.analytics.data.v1beta.CohortSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec buildPartial() { + com.google.analytics.data.v1beta.CohortSpec result = + new com.google.analytics.data.v1beta.CohortSpec(this); + int from_bitField0_ = bitField0_; + if (cohortsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cohorts_ = java.util.Collections.unmodifiableList(cohorts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cohorts_ = cohorts_; + } else { + result.cohorts_ = cohortsBuilder_.build(); + } + if (cohortsRangeBuilder_ == null) { + result.cohortsRange_ = cohortsRange_; + } else { + result.cohortsRange_ = cohortsRangeBuilder_.build(); + } + if (cohortReportSettingsBuilder_ == null) { + result.cohortReportSettings_ = cohortReportSettings_; + } else { + result.cohortReportSettings_ = cohortReportSettingsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.CohortSpec) { + return mergeFrom((com.google.analytics.data.v1beta.CohortSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.CohortSpec other) { + if (other == com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance()) return this; + if (cohortsBuilder_ == null) { + if (!other.cohorts_.isEmpty()) { + if (cohorts_.isEmpty()) { + cohorts_ = other.cohorts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCohortsIsMutable(); + cohorts_.addAll(other.cohorts_); + } + onChanged(); + } + } else { + if (!other.cohorts_.isEmpty()) { + if (cohortsBuilder_.isEmpty()) { + cohortsBuilder_.dispose(); + cohortsBuilder_ = null; + cohorts_ = other.cohorts_; + bitField0_ = (bitField0_ & ~0x00000001); + cohortsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCohortsFieldBuilder() + : null; + } else { + cohortsBuilder_.addAllMessages(other.cohorts_); + } + } + } + if (other.hasCohortsRange()) { + mergeCohortsRange(other.getCohortsRange()); + } + if (other.hasCohortReportSettings()) { + mergeCohortReportSettings(other.getCohortReportSettings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.CohortSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.CohortSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List cohorts_ = + java.util.Collections.emptyList(); + + private void ensureCohortsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cohorts_ = new java.util.ArrayList(cohorts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Cohort, + com.google.analytics.data.v1beta.Cohort.Builder, + com.google.analytics.data.v1beta.CohortOrBuilder> + cohortsBuilder_; + + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public java.util.List getCohortsList() { + if (cohortsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cohorts_); + } else { + return cohortsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public int getCohortsCount() { + if (cohortsBuilder_ == null) { + return cohorts_.size(); + } else { + return cohortsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public com.google.analytics.data.v1beta.Cohort getCohorts(int index) { + if (cohortsBuilder_ == null) { + return cohorts_.get(index); + } else { + return cohortsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder setCohorts(int index, com.google.analytics.data.v1beta.Cohort value) { + if (cohortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCohortsIsMutable(); + cohorts_.set(index, value); + onChanged(); + } else { + cohortsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder setCohorts( + int index, com.google.analytics.data.v1beta.Cohort.Builder builderForValue) { + if (cohortsBuilder_ == null) { + ensureCohortsIsMutable(); + cohorts_.set(index, builderForValue.build()); + onChanged(); + } else { + cohortsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder addCohorts(com.google.analytics.data.v1beta.Cohort value) { + if (cohortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCohortsIsMutable(); + cohorts_.add(value); + onChanged(); + } else { + cohortsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder addCohorts(int index, com.google.analytics.data.v1beta.Cohort value) { + if (cohortsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCohortsIsMutable(); + cohorts_.add(index, value); + onChanged(); + } else { + cohortsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder addCohorts(com.google.analytics.data.v1beta.Cohort.Builder builderForValue) { + if (cohortsBuilder_ == null) { + ensureCohortsIsMutable(); + cohorts_.add(builderForValue.build()); + onChanged(); + } else { + cohortsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder addCohorts( + int index, com.google.analytics.data.v1beta.Cohort.Builder builderForValue) { + if (cohortsBuilder_ == null) { + ensureCohortsIsMutable(); + cohorts_.add(index, builderForValue.build()); + onChanged(); + } else { + cohortsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder addAllCohorts( + java.lang.Iterable values) { + if (cohortsBuilder_ == null) { + ensureCohortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cohorts_); + onChanged(); + } else { + cohortsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder clearCohorts() { + if (cohortsBuilder_ == null) { + cohorts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cohortsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public Builder removeCohorts(int index) { + if (cohortsBuilder_ == null) { + ensureCohortsIsMutable(); + cohorts_.remove(index); + onChanged(); + } else { + cohortsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public com.google.analytics.data.v1beta.Cohort.Builder getCohortsBuilder(int index) { + return getCohortsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public com.google.analytics.data.v1beta.CohortOrBuilder getCohortsOrBuilder(int index) { + if (cohortsBuilder_ == null) { + return cohorts_.get(index); + } else { + return cohortsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public java.util.List + getCohortsOrBuilderList() { + if (cohortsBuilder_ != null) { + return cohortsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cohorts_); + } + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public com.google.analytics.data.v1beta.Cohort.Builder addCohortsBuilder() { + return getCohortsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Cohort.getDefaultInstance()); + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public com.google.analytics.data.v1beta.Cohort.Builder addCohortsBuilder(int index) { + return getCohortsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Cohort.getDefaultInstance()); + } + /** + * + * + *
+     * Defines the selection criteria to group users into cohorts.
+     * Most cohort reports define only a single cohort. If multiple cohorts are
+     * specified, each cohort can be recognized in the report by their name.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + public java.util.List getCohortsBuilderList() { + return getCohortsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Cohort, + com.google.analytics.data.v1beta.Cohort.Builder, + com.google.analytics.data.v1beta.CohortOrBuilder> + getCohortsFieldBuilder() { + if (cohortsBuilder_ == null) { + cohortsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Cohort, + com.google.analytics.data.v1beta.Cohort.Builder, + com.google.analytics.data.v1beta.CohortOrBuilder>( + cohorts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + cohorts_ = null; + } + return cohortsBuilder_; + } + + private com.google.analytics.data.v1beta.CohortsRange cohortsRange_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortsRange, + com.google.analytics.data.v1beta.CohortsRange.Builder, + com.google.analytics.data.v1beta.CohortsRangeOrBuilder> + cohortsRangeBuilder_; + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return Whether the cohortsRange field is set. + */ + public boolean hasCohortsRange() { + return cohortsRangeBuilder_ != null || cohortsRange_ != null; + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return The cohortsRange. + */ + public com.google.analytics.data.v1beta.CohortsRange getCohortsRange() { + if (cohortsRangeBuilder_ == null) { + return cohortsRange_ == null + ? com.google.analytics.data.v1beta.CohortsRange.getDefaultInstance() + : cohortsRange_; + } else { + return cohortsRangeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public Builder setCohortsRange(com.google.analytics.data.v1beta.CohortsRange value) { + if (cohortsRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cohortsRange_ = value; + onChanged(); + } else { + cohortsRangeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public Builder setCohortsRange( + com.google.analytics.data.v1beta.CohortsRange.Builder builderForValue) { + if (cohortsRangeBuilder_ == null) { + cohortsRange_ = builderForValue.build(); + onChanged(); + } else { + cohortsRangeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public Builder mergeCohortsRange(com.google.analytics.data.v1beta.CohortsRange value) { + if (cohortsRangeBuilder_ == null) { + if (cohortsRange_ != null) { + cohortsRange_ = + com.google.analytics.data.v1beta.CohortsRange.newBuilder(cohortsRange_) + .mergeFrom(value) + .buildPartial(); + } else { + cohortsRange_ = value; + } + onChanged(); + } else { + cohortsRangeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public Builder clearCohortsRange() { + if (cohortsRangeBuilder_ == null) { + cohortsRange_ = null; + onChanged(); + } else { + cohortsRange_ = null; + cohortsRangeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public com.google.analytics.data.v1beta.CohortsRange.Builder getCohortsRangeBuilder() { + + onChanged(); + return getCohortsRangeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + public com.google.analytics.data.v1beta.CohortsRangeOrBuilder getCohortsRangeOrBuilder() { + if (cohortsRangeBuilder_ != null) { + return cohortsRangeBuilder_.getMessageOrBuilder(); + } else { + return cohortsRange_ == null + ? com.google.analytics.data.v1beta.CohortsRange.getDefaultInstance() + : cohortsRange_; + } + } + /** + * + * + *
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortsRange, + com.google.analytics.data.v1beta.CohortsRange.Builder, + com.google.analytics.data.v1beta.CohortsRangeOrBuilder> + getCohortsRangeFieldBuilder() { + if (cohortsRangeBuilder_ == null) { + cohortsRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortsRange, + com.google.analytics.data.v1beta.CohortsRange.Builder, + com.google.analytics.data.v1beta.CohortsRangeOrBuilder>( + getCohortsRange(), getParentForChildren(), isClean()); + cohortsRange_ = null; + } + return cohortsRangeBuilder_; + } + + private com.google.analytics.data.v1beta.CohortReportSettings cohortReportSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortReportSettings, + com.google.analytics.data.v1beta.CohortReportSettings.Builder, + com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder> + cohortReportSettingsBuilder_; + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return Whether the cohortReportSettings field is set. + */ + public boolean hasCohortReportSettings() { + return cohortReportSettingsBuilder_ != null || cohortReportSettings_ != null; + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return The cohortReportSettings. + */ + public com.google.analytics.data.v1beta.CohortReportSettings getCohortReportSettings() { + if (cohortReportSettingsBuilder_ == null) { + return cohortReportSettings_ == null + ? com.google.analytics.data.v1beta.CohortReportSettings.getDefaultInstance() + : cohortReportSettings_; + } else { + return cohortReportSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public Builder setCohortReportSettings( + com.google.analytics.data.v1beta.CohortReportSettings value) { + if (cohortReportSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cohortReportSettings_ = value; + onChanged(); + } else { + cohortReportSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public Builder setCohortReportSettings( + com.google.analytics.data.v1beta.CohortReportSettings.Builder builderForValue) { + if (cohortReportSettingsBuilder_ == null) { + cohortReportSettings_ = builderForValue.build(); + onChanged(); + } else { + cohortReportSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public Builder mergeCohortReportSettings( + com.google.analytics.data.v1beta.CohortReportSettings value) { + if (cohortReportSettingsBuilder_ == null) { + if (cohortReportSettings_ != null) { + cohortReportSettings_ = + com.google.analytics.data.v1beta.CohortReportSettings.newBuilder( + cohortReportSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + cohortReportSettings_ = value; + } + onChanged(); + } else { + cohortReportSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public Builder clearCohortReportSettings() { + if (cohortReportSettingsBuilder_ == null) { + cohortReportSettings_ = null; + onChanged(); + } else { + cohortReportSettings_ = null; + cohortReportSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public com.google.analytics.data.v1beta.CohortReportSettings.Builder + getCohortReportSettingsBuilder() { + + onChanged(); + return getCohortReportSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + public com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder + getCohortReportSettingsOrBuilder() { + if (cohortReportSettingsBuilder_ != null) { + return cohortReportSettingsBuilder_.getMessageOrBuilder(); + } else { + return cohortReportSettings_ == null + ? com.google.analytics.data.v1beta.CohortReportSettings.getDefaultInstance() + : cohortReportSettings_; + } + } + /** + * + * + *
+     * Optional settings for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortReportSettings, + com.google.analytics.data.v1beta.CohortReportSettings.Builder, + com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder> + getCohortReportSettingsFieldBuilder() { + if (cohortReportSettingsBuilder_ == null) { + cohortReportSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortReportSettings, + com.google.analytics.data.v1beta.CohortReportSettings.Builder, + com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder>( + getCohortReportSettings(), getParentForChildren(), isClean()); + cohortReportSettings_ = null; + } + return cohortReportSettingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.CohortSpec) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.CohortSpec) + private static final com.google.analytics.data.v1beta.CohortSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.CohortSpec(); + } + + public static com.google.analytics.data.v1beta.CohortSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CohortSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CohortSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpecOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpecOrBuilder.java new file mode 100644 index 00000000..c06e217d --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpecOrBuilder.java @@ -0,0 +1,160 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface CohortSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.CohortSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + java.util.List getCohortsList(); + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + com.google.analytics.data.v1beta.Cohort getCohorts(int index); + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + int getCohortsCount(); + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + java.util.List + getCohortsOrBuilderList(); + /** + * + * + *
+   * Defines the selection criteria to group users into cohorts.
+   * Most cohort reports define only a single cohort. If multiple cohorts are
+   * specified, each cohort can be recognized in the report by their name.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Cohort cohorts = 1; + */ + com.google.analytics.data.v1beta.CohortOrBuilder getCohortsOrBuilder(int index); + + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return Whether the cohortsRange field is set. + */ + boolean hasCohortsRange(); + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + * + * @return The cohortsRange. + */ + com.google.analytics.data.v1beta.CohortsRange getCohortsRange(); + /** + * + * + *
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange cohorts_range = 2; + */ + com.google.analytics.data.v1beta.CohortsRangeOrBuilder getCohortsRangeOrBuilder(); + + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return Whether the cohortReportSettings field is set. + */ + boolean hasCohortReportSettings(); + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + * + * @return The cohortReportSettings. + */ + com.google.analytics.data.v1beta.CohortReportSettings getCohortReportSettings(); + /** + * + * + *
+   * Optional settings for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortReportSettings cohort_report_settings = 3; + */ + com.google.analytics.data.v1beta.CohortReportSettingsOrBuilder getCohortReportSettingsOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRange.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRange.java new file mode 100644 index 00000000..89faa7b5 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRange.java @@ -0,0 +1,1058 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Configures the extended reporting date range for a cohort report. Specifies
+ * an offset duration to follow the cohorts over.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortsRange} + */ +public final class CohortsRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.CohortsRange) + CohortsRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use CohortsRange.newBuilder() to construct. + private CohortsRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CohortsRange() { + granularity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CohortsRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CohortsRange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + granularity_ = rawValue; + break; + } + case 16: + { + startOffset_ = input.readInt32(); + break; + } + case 24: + { + endOffset_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortsRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortsRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortsRange.class, + com.google.analytics.data.v1beta.CohortsRange.Builder.class); + } + + /** + * + * + *
+   * The granularity used to interpret the `startOffset` and `endOffset` for the
+   * extended reporting date range for a cohort report.
+   * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.CohortsRange.Granularity} + */ + public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Should never be specified.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + GRANULARITY_UNSPECIFIED(0), + /** + * + * + *
+     * Daily granularity. Commonly used if the cohort's `dateRange` is a single
+     * day and the request contains `cohortNthDay`.
+     * 
+ * + * DAILY = 1; + */ + DAILY(1), + /** + * + * + *
+     * Weekly granularity. Commonly used if the cohort's `dateRange` is a week
+     * in duration (starting on Sunday and ending on Saturday) and the request
+     * contains `cohortNthWeek`.
+     * 
+ * + * WEEKLY = 2; + */ + WEEKLY(2), + /** + * + * + *
+     * Monthly granularity. Commonly used if the cohort's `dateRange` is a month
+     * in duration and the request contains `cohortNthMonth`.
+     * 
+ * + * MONTHLY = 3; + */ + MONTHLY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Should never be specified.
+     * 
+ * + * GRANULARITY_UNSPECIFIED = 0; + */ + public static final int GRANULARITY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Daily granularity. Commonly used if the cohort's `dateRange` is a single
+     * day and the request contains `cohortNthDay`.
+     * 
+ * + * DAILY = 1; + */ + public static final int DAILY_VALUE = 1; + /** + * + * + *
+     * Weekly granularity. Commonly used if the cohort's `dateRange` is a week
+     * in duration (starting on Sunday and ending on Saturday) and the request
+     * contains `cohortNthWeek`.
+     * 
+ * + * WEEKLY = 2; + */ + public static final int WEEKLY_VALUE = 2; + /** + * + * + *
+     * Monthly granularity. Commonly used if the cohort's `dateRange` is a month
+     * in duration and the request contains `cohortNthMonth`.
+     * 
+ * + * MONTHLY = 3; + */ + public static final int MONTHLY_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Granularity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Granularity forNumber(int value) { + switch (value) { + case 0: + return GRANULARITY_UNSPECIFIED; + case 1: + return DAILY; + case 2: + return WEEKLY; + case 3: + return MONTHLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Granularity findValueByNumber(int number) { + return Granularity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.CohortsRange.getDescriptor().getEnumTypes().get(0); + } + + private static final Granularity[] VALUES = values(); + + public static Granularity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Granularity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.CohortsRange.Granularity) + } + + public static final int GRANULARITY_FIELD_NUMBER = 1; + private int granularity_; + /** + * + * + *
+   * Required. The granularity used to interpret the `startOffset` and
+   * `endOffset` for the extended reporting date range for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+   * Required. The granularity used to interpret the `startOffset` and
+   * `endOffset` for the extended reporting date range for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The granularity. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange.Granularity getGranularity() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.CohortsRange.Granularity result = + com.google.analytics.data.v1beta.CohortsRange.Granularity.valueOf(granularity_); + return result == null + ? com.google.analytics.data.v1beta.CohortsRange.Granularity.UNRECOGNIZED + : result; + } + + public static final int START_OFFSET_FIELD_NUMBER = 2; + private int startOffset_; + /** + * + * + *
+   * `startOffset` specifies the start date of the extended reporting date range
+   * for a cohort report. `startOffset` is commonly set to 0 so that reports
+   * contain data from the acquisition of the cohort forward.
+   * If `granularity` is `DAILY`, the `startDate` of the extended reporting date
+   * range is `startDate` of the cohort plus `startOffset` days.
+   * If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
+   * date range is `startDate` of the cohort plus `startOffset * 7` days.
+   * If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
+   * date range is `startDate` of the cohort plus `startOffset * 30` days.
+   * 
+ * + * int32 start_offset = 2; + * + * @return The startOffset. + */ + @java.lang.Override + public int getStartOffset() { + return startOffset_; + } + + public static final int END_OFFSET_FIELD_NUMBER = 3; + private int endOffset_; + /** + * + * + *
+   * Required. `endOffset` specifies the end date of the extended reporting date
+   * range for a cohort report. `endOffset` can be any positive integer but is
+   * commonly set to 5 to 10 so that reports contain data on the cohort for the
+   * next several granularity time periods.
+   * If `granularity` is `DAILY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset` days.
+   * If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset * 7` days.
+   * If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset * 30` days.
+   * 
+ * + * int32 end_offset = 3; + * + * @return The endOffset. + */ + @java.lang.Override + public int getEndOffset() { + return endOffset_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (granularity_ + != com.google.analytics.data.v1beta.CohortsRange.Granularity.GRANULARITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, granularity_); + } + if (startOffset_ != 0) { + output.writeInt32(2, startOffset_); + } + if (endOffset_ != 0) { + output.writeInt32(3, endOffset_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (granularity_ + != com.google.analytics.data.v1beta.CohortsRange.Granularity.GRANULARITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, granularity_); + } + if (startOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, startOffset_); + } + if (endOffset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, endOffset_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.CohortsRange)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.CohortsRange other = + (com.google.analytics.data.v1beta.CohortsRange) obj; + + if (granularity_ != other.granularity_) return false; + if (getStartOffset() != other.getStartOffset()) return false; + if (getEndOffset() != other.getEndOffset()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GRANULARITY_FIELD_NUMBER; + hash = (53 * hash) + granularity_; + hash = (37 * hash) + START_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartOffset(); + hash = (37 * hash) + END_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndOffset(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.CohortsRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.CohortsRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configures the extended reporting date range for a cohort report. Specifies
+   * an offset duration to follow the cohorts over.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.CohortsRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.CohortsRange) + com.google.analytics.data.v1beta.CohortsRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortsRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortsRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.CohortsRange.class, + com.google.analytics.data.v1beta.CohortsRange.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.CohortsRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + granularity_ = 0; + + startOffset_ = 0; + + endOffset_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_CohortsRange_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.CohortsRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange build() { + com.google.analytics.data.v1beta.CohortsRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange buildPartial() { + com.google.analytics.data.v1beta.CohortsRange result = + new com.google.analytics.data.v1beta.CohortsRange(this); + result.granularity_ = granularity_; + result.startOffset_ = startOffset_; + result.endOffset_ = endOffset_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.CohortsRange) { + return mergeFrom((com.google.analytics.data.v1beta.CohortsRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.CohortsRange other) { + if (other == com.google.analytics.data.v1beta.CohortsRange.getDefaultInstance()) return this; + if (other.granularity_ != 0) { + setGranularityValue(other.getGranularityValue()); + } + if (other.getStartOffset() != 0) { + setStartOffset(other.getStartOffset()); + } + if (other.getEndOffset() != 0) { + setEndOffset(other.getEndOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.CohortsRange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.CohortsRange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int granularity_ = 0; + /** + * + * + *
+     * Required. The granularity used to interpret the `startOffset` and
+     * `endOffset` for the extended reporting date range for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The enum numeric value on the wire for granularity. + */ + @java.lang.Override + public int getGranularityValue() { + return granularity_; + } + /** + * + * + *
+     * Required. The granularity used to interpret the `startOffset` and
+     * `endOffset` for the extended reporting date range for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @param value The enum numeric value on the wire for granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularityValue(int value) { + + granularity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The granularity used to interpret the `startOffset` and
+     * `endOffset` for the extended reporting date range for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The granularity. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange.Granularity getGranularity() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.CohortsRange.Granularity result = + com.google.analytics.data.v1beta.CohortsRange.Granularity.valueOf(granularity_); + return result == null + ? com.google.analytics.data.v1beta.CohortsRange.Granularity.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The granularity used to interpret the `startOffset` and
+     * `endOffset` for the extended reporting date range for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @param value The granularity to set. + * @return This builder for chaining. + */ + public Builder setGranularity(com.google.analytics.data.v1beta.CohortsRange.Granularity value) { + if (value == null) { + throw new NullPointerException(); + } + + granularity_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The granularity used to interpret the `startOffset` and
+     * `endOffset` for the extended reporting date range for a cohort report.
+     * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return This builder for chaining. + */ + public Builder clearGranularity() { + + granularity_ = 0; + onChanged(); + return this; + } + + private int startOffset_; + /** + * + * + *
+     * `startOffset` specifies the start date of the extended reporting date range
+     * for a cohort report. `startOffset` is commonly set to 0 so that reports
+     * contain data from the acquisition of the cohort forward.
+     * If `granularity` is `DAILY`, the `startDate` of the extended reporting date
+     * range is `startDate` of the cohort plus `startOffset` days.
+     * If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 30` days.
+     * 
+ * + * int32 start_offset = 2; + * + * @return The startOffset. + */ + @java.lang.Override + public int getStartOffset() { + return startOffset_; + } + /** + * + * + *
+     * `startOffset` specifies the start date of the extended reporting date range
+     * for a cohort report. `startOffset` is commonly set to 0 so that reports
+     * contain data from the acquisition of the cohort forward.
+     * If `granularity` is `DAILY`, the `startDate` of the extended reporting date
+     * range is `startDate` of the cohort plus `startOffset` days.
+     * If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 30` days.
+     * 
+ * + * int32 start_offset = 2; + * + * @param value The startOffset to set. + * @return This builder for chaining. + */ + public Builder setStartOffset(int value) { + + startOffset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * `startOffset` specifies the start date of the extended reporting date range
+     * for a cohort report. `startOffset` is commonly set to 0 so that reports
+     * contain data from the acquisition of the cohort forward.
+     * If `granularity` is `DAILY`, the `startDate` of the extended reporting date
+     * range is `startDate` of the cohort plus `startOffset` days.
+     * If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
+     * date range is `startDate` of the cohort plus `startOffset * 30` days.
+     * 
+ * + * int32 start_offset = 2; + * + * @return This builder for chaining. + */ + public Builder clearStartOffset() { + + startOffset_ = 0; + onChanged(); + return this; + } + + private int endOffset_; + /** + * + * + *
+     * Required. `endOffset` specifies the end date of the extended reporting date
+     * range for a cohort report. `endOffset` can be any positive integer but is
+     * commonly set to 5 to 10 so that reports contain data on the cohort for the
+     * next several granularity time periods.
+     * If `granularity` is `DAILY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset` days.
+     * If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 30` days.
+     * 
+ * + * int32 end_offset = 3; + * + * @return The endOffset. + */ + @java.lang.Override + public int getEndOffset() { + return endOffset_; + } + /** + * + * + *
+     * Required. `endOffset` specifies the end date of the extended reporting date
+     * range for a cohort report. `endOffset` can be any positive integer but is
+     * commonly set to 5 to 10 so that reports contain data on the cohort for the
+     * next several granularity time periods.
+     * If `granularity` is `DAILY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset` days.
+     * If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 30` days.
+     * 
+ * + * int32 end_offset = 3; + * + * @param value The endOffset to set. + * @return This builder for chaining. + */ + public Builder setEndOffset(int value) { + + endOffset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. `endOffset` specifies the end date of the extended reporting date
+     * range for a cohort report. `endOffset` can be any positive integer but is
+     * commonly set to 5 to 10 so that reports contain data on the cohort for the
+     * next several granularity time periods.
+     * If `granularity` is `DAILY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset` days.
+     * If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 7` days.
+     * If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
+     * range is `endDate` of the cohort plus `endOffset * 30` days.
+     * 
+ * + * int32 end_offset = 3; + * + * @return This builder for chaining. + */ + public Builder clearEndOffset() { + + endOffset_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.CohortsRange) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.CohortsRange) + private static final com.google.analytics.data.v1beta.CohortsRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.CohortsRange(); + } + + public static com.google.analytics.data.v1beta.CohortsRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CohortsRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CohortsRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.CohortsRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRangeOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRangeOrBuilder.java new file mode 100644 index 00000000..45e963a3 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRangeOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface CohortsRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.CohortsRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The granularity used to interpret the `startOffset` and
+   * `endOffset` for the extended reporting date range for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The enum numeric value on the wire for granularity. + */ + int getGranularityValue(); + /** + * + * + *
+   * Required. The granularity used to interpret the `startOffset` and
+   * `endOffset` for the extended reporting date range for a cohort report.
+   * 
+ * + * .google.analytics.data.v1beta.CohortsRange.Granularity granularity = 1; + * + * @return The granularity. + */ + com.google.analytics.data.v1beta.CohortsRange.Granularity getGranularity(); + + /** + * + * + *
+   * `startOffset` specifies the start date of the extended reporting date range
+   * for a cohort report. `startOffset` is commonly set to 0 so that reports
+   * contain data from the acquisition of the cohort forward.
+   * If `granularity` is `DAILY`, the `startDate` of the extended reporting date
+   * range is `startDate` of the cohort plus `startOffset` days.
+   * If `granularity` is `WEEKLY`, the `startDate` of the extended reporting
+   * date range is `startDate` of the cohort plus `startOffset * 7` days.
+   * If `granularity` is `MONTHLY`, the `startDate` of the extended reporting
+   * date range is `startDate` of the cohort plus `startOffset * 30` days.
+   * 
+ * + * int32 start_offset = 2; + * + * @return The startOffset. + */ + int getStartOffset(); + + /** + * + * + *
+   * Required. `endOffset` specifies the end date of the extended reporting date
+   * range for a cohort report. `endOffset` can be any positive integer but is
+   * commonly set to 5 to 10 so that reports contain data on the cohort for the
+   * next several granularity time periods.
+   * If `granularity` is `DAILY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset` days.
+   * If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset * 7` days.
+   * If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date
+   * range is `endDate` of the cohort plus `endOffset * 30` days.
+   * 
+ * + * int32 end_offset = 3; + * + * @return The endOffset. + */ + int getEndOffset(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRange.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRange.java new file mode 100644 index 00000000..09368707 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRange.java @@ -0,0 +1,1057 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests
+ * are allowed up to 4 date ranges.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DateRange} + */ +public final class DateRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DateRange) + DateRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DateRange.newBuilder() to construct. + private DateRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DateRange() { + startDate_ = ""; + endDate_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DateRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DateRange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + startDate_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + endDate_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DateRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DateRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DateRange.class, + com.google.analytics.data.v1beta.DateRange.Builder.class); + } + + public static final int START_DATE_FIELD_NUMBER = 1; + private volatile java.lang.Object startDate_; + /** + * + * + *
+   * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+   * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+   * accepted, and in that case, the date is inferred based on the property's
+   * reporting time zone.
+   * 
+ * + * string start_date = 1; + * + * @return The startDate. + */ + @java.lang.Override + public java.lang.String getStartDate() { + java.lang.Object ref = startDate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startDate_ = s; + return s; + } + } + /** + * + * + *
+   * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+   * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+   * accepted, and in that case, the date is inferred based on the property's
+   * reporting time zone.
+   * 
+ * + * string start_date = 1; + * + * @return The bytes for startDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartDateBytes() { + java.lang.Object ref = startDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int END_DATE_FIELD_NUMBER = 2; + private volatile java.lang.Object endDate_; + /** + * + * + *
+   * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+   * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+   * also accepted, and in that case, the date is inferred based on the
+   * property's reporting time zone.
+   * 
+ * + * string end_date = 2; + * + * @return The endDate. + */ + @java.lang.Override + public java.lang.String getEndDate() { + java.lang.Object ref = endDate_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endDate_ = s; + return s; + } + } + /** + * + * + *
+   * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+   * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+   * also accepted, and in that case, the date is inferred based on the
+   * property's reporting time zone.
+   * 
+ * + * string end_date = 2; + * + * @return The bytes for endDate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndDateBytes() { + java.lang.Object ref = endDate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Assigns a name to this date range. The dimension `dateRange` is valued to
+   * this name in a report response. If set, cannot begin with `date_range_` or
+   * `RESERVED_`. If not set, date ranges are named by their zero based index in
+   * the request: `date_range_0`, `date_range_1`, etc.
+   * 
+ * + * string name = 3; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Assigns a name to this date range. The dimension `dateRange` is valued to
+   * this name in a report response. If set, cannot begin with `date_range_` or
+   * `RESERVED_`. If not set, date ranges are named by their zero based index in
+   * the request: `date_range_0`, `date_range_1`, etc.
+   * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getStartDateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, startDate_); + } + if (!getEndDateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endDate_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getStartDateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, startDate_); + } + if (!getEndDateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endDate_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DateRange)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DateRange other = + (com.google.analytics.data.v1beta.DateRange) obj; + + if (!getStartDate().equals(other.getStartDate())) return false; + if (!getEndDate().equals(other.getEndDate())) return false; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_DATE_FIELD_NUMBER; + hash = (53 * hash) + getStartDate().hashCode(); + hash = (37 * hash) + END_DATE_FIELD_NUMBER; + hash = (53 * hash) + getEndDate().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DateRange parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DateRange parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DateRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.DateRange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests
+   * are allowed up to 4 date ranges.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DateRange} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DateRange) + com.google.analytics.data.v1beta.DateRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DateRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DateRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DateRange.class, + com.google.analytics.data.v1beta.DateRange.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.DateRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + startDate_ = ""; + + endDate_ = ""; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DateRange_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DateRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange build() { + com.google.analytics.data.v1beta.DateRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange buildPartial() { + com.google.analytics.data.v1beta.DateRange result = + new com.google.analytics.data.v1beta.DateRange(this); + result.startDate_ = startDate_; + result.endDate_ = endDate_; + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DateRange) { + return mergeFrom((com.google.analytics.data.v1beta.DateRange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.DateRange other) { + if (other == com.google.analytics.data.v1beta.DateRange.getDefaultInstance()) return this; + if (!other.getStartDate().isEmpty()) { + startDate_ = other.startDate_; + onChanged(); + } + if (!other.getEndDate().isEmpty()) { + endDate_ = other.endDate_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DateRange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.DateRange) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object startDate_ = ""; + /** + * + * + *
+     * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+     * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+     * accepted, and in that case, the date is inferred based on the property's
+     * reporting time zone.
+     * 
+ * + * string start_date = 1; + * + * @return The startDate. + */ + public java.lang.String getStartDate() { + java.lang.Object ref = startDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+     * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+     * accepted, and in that case, the date is inferred based on the property's
+     * reporting time zone.
+     * 
+ * + * string start_date = 1; + * + * @return The bytes for startDate. + */ + public com.google.protobuf.ByteString getStartDateBytes() { + java.lang.Object ref = startDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+     * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+     * accepted, and in that case, the date is inferred based on the property's
+     * reporting time zone.
+     * 
+ * + * string start_date = 1; + * + * @param value The startDate to set. + * @return This builder for chaining. + */ + public Builder setStartDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + startDate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+     * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+     * accepted, and in that case, the date is inferred based on the property's
+     * reporting time zone.
+     * 
+ * + * string start_date = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartDate() { + + startDate_ = getDefaultInstance().getStartDate(); + onChanged(); + return this; + } + /** + * + * + *
+     * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+     * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+     * accepted, and in that case, the date is inferred based on the property's
+     * reporting time zone.
+     * 
+ * + * string start_date = 1; + * + * @param value The bytes for startDate to set. + * @return This builder for chaining. + */ + public Builder setStartDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + startDate_ = value; + onChanged(); + return this; + } + + private java.lang.Object endDate_ = ""; + /** + * + * + *
+     * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+     * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+     * also accepted, and in that case, the date is inferred based on the
+     * property's reporting time zone.
+     * 
+ * + * string end_date = 2; + * + * @return The endDate. + */ + public java.lang.String getEndDate() { + java.lang.Object ref = endDate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endDate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+     * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+     * also accepted, and in that case, the date is inferred based on the
+     * property's reporting time zone.
+     * 
+ * + * string end_date = 2; + * + * @return The bytes for endDate. + */ + public com.google.protobuf.ByteString getEndDateBytes() { + java.lang.Object ref = endDate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endDate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+     * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+     * also accepted, and in that case, the date is inferred based on the
+     * property's reporting time zone.
+     * 
+ * + * string end_date = 2; + * + * @param value The endDate to set. + * @return This builder for chaining. + */ + public Builder setEndDate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + endDate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+     * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+     * also accepted, and in that case, the date is inferred based on the
+     * property's reporting time zone.
+     * 
+ * + * string end_date = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndDate() { + + endDate_ = getDefaultInstance().getEndDate(); + onChanged(); + return this; + } + /** + * + * + *
+     * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+     * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+     * also accepted, and in that case, the date is inferred based on the
+     * property's reporting time zone.
+     * 
+ * + * string end_date = 2; + * + * @param value The bytes for endDate to set. + * @return This builder for chaining. + */ + public Builder setEndDateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + endDate_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Assigns a name to this date range. The dimension `dateRange` is valued to
+     * this name in a report response. If set, cannot begin with `date_range_` or
+     * `RESERVED_`. If not set, date ranges are named by their zero based index in
+     * the request: `date_range_0`, `date_range_1`, etc.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Assigns a name to this date range. The dimension `dateRange` is valued to
+     * this name in a report response. If set, cannot begin with `date_range_` or
+     * `RESERVED_`. If not set, date ranges are named by their zero based index in
+     * the request: `date_range_0`, `date_range_1`, etc.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Assigns a name to this date range. The dimension `dateRange` is valued to
+     * this name in a report response. If set, cannot begin with `date_range_` or
+     * `RESERVED_`. If not set, date ranges are named by their zero based index in
+     * the request: `date_range_0`, `date_range_1`, etc.
+     * 
+ * + * string name = 3; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Assigns a name to this date range. The dimension `dateRange` is valued to
+     * this name in a report response. If set, cannot begin with `date_range_` or
+     * `RESERVED_`. If not set, date ranges are named by their zero based index in
+     * the request: `date_range_0`, `date_range_1`, etc.
+     * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Assigns a name to this date range. The dimension `dateRange` is valued to
+     * this name in a report response. If set, cannot begin with `date_range_` or
+     * `RESERVED_`. If not set, date ranges are named by their zero based index in
+     * the request: `date_range_0`, `date_range_1`, etc.
+     * 
+ * + * string name = 3; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DateRange) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DateRange) + private static final com.google.analytics.data.v1beta.DateRange DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DateRange(); + } + + public static com.google.analytics.data.v1beta.DateRange getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DateRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRangeOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRangeOrBuilder.java new file mode 100644 index 00000000..b08bd6d1 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRangeOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DateRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DateRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+   * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+   * accepted, and in that case, the date is inferred based on the property's
+   * reporting time zone.
+   * 
+ * + * string start_date = 1; + * + * @return The startDate. + */ + java.lang.String getStartDate(); + /** + * + * + *
+   * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot
+   * be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also
+   * accepted, and in that case, the date is inferred based on the property's
+   * reporting time zone.
+   * 
+ * + * string start_date = 1; + * + * @return The bytes for startDate. + */ + com.google.protobuf.ByteString getStartDateBytes(); + + /** + * + * + *
+   * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+   * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+   * also accepted, and in that case, the date is inferred based on the
+   * property's reporting time zone.
+   * 
+ * + * string end_date = 2; + * + * @return The endDate. + */ + java.lang.String getEndDate(); + /** + * + * + *
+   * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot
+   * be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is
+   * also accepted, and in that case, the date is inferred based on the
+   * property's reporting time zone.
+   * 
+ * + * string end_date = 2; + * + * @return The bytes for endDate. + */ + com.google.protobuf.ByteString getEndDateBytes(); + + /** + * + * + *
+   * Assigns a name to this date range. The dimension `dateRange` is valued to
+   * this name in a report response. If set, cannot begin with `date_range_` or
+   * `RESERVED_`. If not set, date ranges are named by their zero based index in
+   * the request: `date_range_0`, `date_range_1`, etc.
+   * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Assigns a name to this date range. The dimension `dateRange` is valued to
+   * this name in a report response. If set, cannot begin with `date_range_` or
+   * `RESERVED_`. If not set, date ranges are named by their zero based index in
+   * the request: `date_range_0`, `date_range_1`, etc.
+   * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Dimension.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Dimension.java new file mode 100644 index 00000000..e0d3b9c9 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Dimension.java @@ -0,0 +1,999 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Dimensions are attributes of your data. For example, the dimension city
+ * indicates the city from which an event originates. Dimension values in report
+ * responses are strings; for example, city could be "Paris" or "New York".
+ * Requests are allowed up to 8 dimensions.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Dimension} + */ +public final class Dimension extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Dimension) + DimensionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dimension.newBuilder() to construct. + private Dimension(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Dimension() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Dimension(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Dimension( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.analytics.data.v1beta.DimensionExpression.Builder subBuilder = null; + if (dimensionExpression_ != null) { + subBuilder = dimensionExpression_.toBuilder(); + } + dimensionExpression_ = + input.readMessage( + com.google.analytics.data.v1beta.DimensionExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dimensionExpression_); + dimensionExpression_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Dimension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Dimension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Dimension.class, + com.google.analytics.data.v1beta.Dimension.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the dimension. See the [API
+   * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+   * for the list of dimension names.
+   * If `dimensionExpression` is specified, `name` can be any string that you
+   * would like within the allowed character set. For example if a
+   * `dimensionExpression` concatenates `country` and `city`, you could call
+   * that dimension `countryAndCity`. Dimension names that you choose must match
+   * the regular expression "^[a-zA-Z0-9_]$".
+   * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+   * `dimensionExpression`, and `pivots`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the dimension. See the [API
+   * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+   * for the list of dimension names.
+   * If `dimensionExpression` is specified, `name` can be any string that you
+   * would like within the allowed character set. For example if a
+   * `dimensionExpression` concatenates `country` and `city`, you could call
+   * that dimension `countryAndCity`. Dimension names that you choose must match
+   * the regular expression "^[a-zA-Z0-9_]$".
+   * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+   * `dimensionExpression`, and `pivots`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSION_EXPRESSION_FIELD_NUMBER = 2; + private com.google.analytics.data.v1beta.DimensionExpression dimensionExpression_; + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return Whether the dimensionExpression field is set. + */ + @java.lang.Override + public boolean hasDimensionExpression() { + return dimensionExpression_ != null; + } + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return The dimensionExpression. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression getDimensionExpression() { + return dimensionExpression_ == null + ? com.google.analytics.data.v1beta.DimensionExpression.getDefaultInstance() + : dimensionExpression_; + } + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpressionOrBuilder + getDimensionExpressionOrBuilder() { + return getDimensionExpression(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (dimensionExpression_ != null) { + output.writeMessage(2, getDimensionExpression()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (dimensionExpression_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDimensionExpression()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Dimension)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Dimension other = + (com.google.analytics.data.v1beta.Dimension) obj; + + if (!getName().equals(other.getName())) return false; + if (hasDimensionExpression() != other.hasDimensionExpression()) return false; + if (hasDimensionExpression()) { + if (!getDimensionExpression().equals(other.getDimensionExpression())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasDimensionExpression()) { + hash = (37 * hash) + DIMENSION_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getDimensionExpression().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Dimension parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Dimension parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Dimension parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Dimension prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dimensions are attributes of your data. For example, the dimension city
+   * indicates the city from which an event originates. Dimension values in report
+   * responses are strings; for example, city could be "Paris" or "New York".
+   * Requests are allowed up to 8 dimensions.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Dimension} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Dimension) + com.google.analytics.data.v1beta.DimensionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Dimension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Dimension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Dimension.class, + com.google.analytics.data.v1beta.Dimension.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Dimension.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (dimensionExpressionBuilder_ == null) { + dimensionExpression_ = null; + } else { + dimensionExpression_ = null; + dimensionExpressionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Dimension_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Dimension.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension build() { + com.google.analytics.data.v1beta.Dimension result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension buildPartial() { + com.google.analytics.data.v1beta.Dimension result = + new com.google.analytics.data.v1beta.Dimension(this); + result.name_ = name_; + if (dimensionExpressionBuilder_ == null) { + result.dimensionExpression_ = dimensionExpression_; + } else { + result.dimensionExpression_ = dimensionExpressionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Dimension) { + return mergeFrom((com.google.analytics.data.v1beta.Dimension) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Dimension other) { + if (other == com.google.analytics.data.v1beta.Dimension.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasDimensionExpression()) { + mergeDimensionExpression(other.getDimensionExpression()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Dimension parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Dimension) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the dimension. See the [API
+     * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+     * for the list of dimension names.
+     * If `dimensionExpression` is specified, `name` can be any string that you
+     * would like within the allowed character set. For example if a
+     * `dimensionExpression` concatenates `country` and `city`, you could call
+     * that dimension `countryAndCity`. Dimension names that you choose must match
+     * the regular expression "^[a-zA-Z0-9_]$".
+     * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+     * `dimensionExpression`, and `pivots`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the dimension. See the [API
+     * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+     * for the list of dimension names.
+     * If `dimensionExpression` is specified, `name` can be any string that you
+     * would like within the allowed character set. For example if a
+     * `dimensionExpression` concatenates `country` and `city`, you could call
+     * that dimension `countryAndCity`. Dimension names that you choose must match
+     * the regular expression "^[a-zA-Z0-9_]$".
+     * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+     * `dimensionExpression`, and `pivots`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the dimension. See the [API
+     * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+     * for the list of dimension names.
+     * If `dimensionExpression` is specified, `name` can be any string that you
+     * would like within the allowed character set. For example if a
+     * `dimensionExpression` concatenates `country` and `city`, you could call
+     * that dimension `countryAndCity`. Dimension names that you choose must match
+     * the regular expression "^[a-zA-Z0-9_]$".
+     * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+     * `dimensionExpression`, and `pivots`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the dimension. See the [API
+     * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+     * for the list of dimension names.
+     * If `dimensionExpression` is specified, `name` can be any string that you
+     * would like within the allowed character set. For example if a
+     * `dimensionExpression` concatenates `country` and `city`, you could call
+     * that dimension `countryAndCity`. Dimension names that you choose must match
+     * the regular expression "^[a-zA-Z0-9_]$".
+     * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+     * `dimensionExpression`, and `pivots`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the dimension. See the [API
+     * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+     * for the list of dimension names.
+     * If `dimensionExpression` is specified, `name` can be any string that you
+     * would like within the allowed character set. For example if a
+     * `dimensionExpression` concatenates `country` and `city`, you could call
+     * that dimension `countryAndCity`. Dimension names that you choose must match
+     * the regular expression "^[a-zA-Z0-9_]$".
+     * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+     * `dimensionExpression`, and `pivots`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.DimensionExpression dimensionExpression_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression, + com.google.analytics.data.v1beta.DimensionExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpressionOrBuilder> + dimensionExpressionBuilder_; + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return Whether the dimensionExpression field is set. + */ + public boolean hasDimensionExpression() { + return dimensionExpressionBuilder_ != null || dimensionExpression_ != null; + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return The dimensionExpression. + */ + public com.google.analytics.data.v1beta.DimensionExpression getDimensionExpression() { + if (dimensionExpressionBuilder_ == null) { + return dimensionExpression_ == null + ? com.google.analytics.data.v1beta.DimensionExpression.getDefaultInstance() + : dimensionExpression_; + } else { + return dimensionExpressionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public Builder setDimensionExpression( + com.google.analytics.data.v1beta.DimensionExpression value) { + if (dimensionExpressionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dimensionExpression_ = value; + onChanged(); + } else { + dimensionExpressionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public Builder setDimensionExpression( + com.google.analytics.data.v1beta.DimensionExpression.Builder builderForValue) { + if (dimensionExpressionBuilder_ == null) { + dimensionExpression_ = builderForValue.build(); + onChanged(); + } else { + dimensionExpressionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public Builder mergeDimensionExpression( + com.google.analytics.data.v1beta.DimensionExpression value) { + if (dimensionExpressionBuilder_ == null) { + if (dimensionExpression_ != null) { + dimensionExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.newBuilder(dimensionExpression_) + .mergeFrom(value) + .buildPartial(); + } else { + dimensionExpression_ = value; + } + onChanged(); + } else { + dimensionExpressionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public Builder clearDimensionExpression() { + if (dimensionExpressionBuilder_ == null) { + dimensionExpression_ = null; + onChanged(); + } else { + dimensionExpression_ = null; + dimensionExpressionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public com.google.analytics.data.v1beta.DimensionExpression.Builder + getDimensionExpressionBuilder() { + + onChanged(); + return getDimensionExpressionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + public com.google.analytics.data.v1beta.DimensionExpressionOrBuilder + getDimensionExpressionOrBuilder() { + if (dimensionExpressionBuilder_ != null) { + return dimensionExpressionBuilder_.getMessageOrBuilder(); + } else { + return dimensionExpression_ == null + ? com.google.analytics.data.v1beta.DimensionExpression.getDefaultInstance() + : dimensionExpression_; + } + } + /** + * + * + *
+     * One dimension can be the result of an expression of multiple dimensions.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression, + com.google.analytics.data.v1beta.DimensionExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpressionOrBuilder> + getDimensionExpressionFieldBuilder() { + if (dimensionExpressionBuilder_ == null) { + dimensionExpressionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression, + com.google.analytics.data.v1beta.DimensionExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpressionOrBuilder>( + getDimensionExpression(), getParentForChildren(), isClean()); + dimensionExpression_ = null; + } + return dimensionExpressionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Dimension) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Dimension) + private static final com.google.analytics.data.v1beta.Dimension DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Dimension(); + } + + public static com.google.analytics.data.v1beta.Dimension getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dimension parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dimension(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpression.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpression.java new file mode 100644 index 00000000..2482d358 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpression.java @@ -0,0 +1,3318 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Used to express a dimension which is the result of a formula of multiple
+ * dimensions. Example usages:
+ * 1) lower_case(dimension)
+ * 2) concatenate(dimension1, symbol, dimension2).
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression} + */ +public final class DimensionExpression extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionExpression) + DimensionExpressionOrBuilder { + private static final long serialVersionUID = 0L; + // Use DimensionExpression.newBuilder() to construct. + private DimensionExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DimensionExpression() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DimensionExpression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DimensionExpression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + subBuilder = null; + if (oneExpressionCase_ == 4) { + subBuilder = + ((com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_) + .toBuilder(); + } + oneExpression_ = + input.readMessage( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_); + oneExpression_ = subBuilder.buildPartial(); + } + oneExpressionCase_ = 4; + break; + } + case 42: + { + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + subBuilder = null; + if (oneExpressionCase_ == 5) { + subBuilder = + ((com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_) + .toBuilder(); + } + oneExpression_ = + input.readMessage( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_); + oneExpression_ = subBuilder.buildPartial(); + } + oneExpressionCase_ = 5; + break; + } + case 50: + { + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder + subBuilder = null; + if (oneExpressionCase_ == 6) { + subBuilder = + ((com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_) + .toBuilder(); + } + oneExpression_ = + input.readMessage( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_); + oneExpression_ = subBuilder.buildPartial(); + } + oneExpressionCase_ = 6; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.Builder.class); + } + + public interface CaseExpressionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionExpression.CaseExpression) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Name of a dimension. The name must refer back to a name in dimensions
+     * field of the request.
+     * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + java.lang.String getDimensionName(); + /** + * + * + *
+     * Name of a dimension. The name must refer back to a name in dimensions
+     * field of the request.
+     * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + com.google.protobuf.ByteString getDimensionNameBytes(); + } + /** + * + * + *
+   * Used to convert a dimension value to a single case.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression.CaseExpression} + */ + public static final class CaseExpression extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionExpression.CaseExpression) + CaseExpressionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CaseExpression.newBuilder() to construct. + private CaseExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CaseExpression() { + dimensionName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CaseExpression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CaseExpression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dimensionName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder.class); + } + + public static final int DIMENSION_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object dimensionName_; + /** + * + * + *
+     * Name of a dimension. The name must refer back to a name in dimensions
+     * field of the request.
+     * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + @java.lang.Override + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } + } + /** + * + * + *
+     * Name of a dimension. The name must refer back to a name in dimensions
+     * field of the request.
+     * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDimensionNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dimensionName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDimensionNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dimensionName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DimensionExpression.CaseExpression)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression other = + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) obj; + + if (!getDimensionName().equals(other.getDimensionName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DIMENSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDimensionName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Used to convert a dimension value to a single case.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression.CaseExpression} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionExpression.CaseExpression) + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder.class); + } + + // Construct using + // com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dimensionName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression build() { + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression buildPartial() { + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression result = + new com.google.analytics.data.v1beta.DimensionExpression.CaseExpression(this); + result.dimensionName_ = dimensionName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) { + return mergeFrom( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression other) { + if (other + == com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance()) return this; + if (!other.getDimensionName().isEmpty()) { + dimensionName_ = other.dimensionName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dimensionName_ = ""; + /** + * + * + *
+       * Name of a dimension. The name must refer back to a name in dimensions
+       * field of the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Name of a dimension. The name must refer back to a name in dimensions
+       * field of the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Name of a dimension. The name must refer back to a name in dimensions
+       * field of the request.
+       * 
+ * + * string dimension_name = 1; + * + * @param value The dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimensionName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Name of a dimension. The name must refer back to a name in dimensions
+       * field of the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDimensionName() { + + dimensionName_ = getDefaultInstance().getDimensionName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Name of a dimension. The name must refer back to a name in dimensions
+       * field of the request.
+       * 
+ * + * string dimension_name = 1; + * + * @param value The bytes for dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimensionName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionExpression.CaseExpression) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionExpression.CaseExpression) + private static final com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DimensionExpression.CaseExpression(); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CaseExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CaseExpression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConcatenateExpressionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @return A list containing the dimensionNames. + */ + java.util.List getDimensionNamesList(); + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @return The count of dimensionNames. + */ + int getDimensionNamesCount(); + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the element to return. + * @return The dimensionNames at the given index. + */ + java.lang.String getDimensionNames(int index); + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dimensionNames at the given index. + */ + com.google.protobuf.ByteString getDimensionNamesBytes(int index); + + /** + * + * + *
+     * The delimiter placed between dimension names.
+     * Delimiters are often single characters such as "|" or "," but can be
+     * longer strings. If a dimension value contains the delimiter, both will be
+     * present in response with no distinction. For example if dimension 1 value
+     * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+     * response will contain "US,FR,JP".
+     * 
+ * + * string delimiter = 2; + * + * @return The delimiter. + */ + java.lang.String getDelimiter(); + /** + * + * + *
+     * The delimiter placed between dimension names.
+     * Delimiters are often single characters such as "|" or "," but can be
+     * longer strings. If a dimension value contains the delimiter, both will be
+     * present in response with no distinction. For example if dimension 1 value
+     * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+     * response will contain "US,FR,JP".
+     * 
+ * + * string delimiter = 2; + * + * @return The bytes for delimiter. + */ + com.google.protobuf.ByteString getDelimiterBytes(); + } + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} + */ + public static final class ConcatenateExpression extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + ConcatenateExpressionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConcatenateExpression.newBuilder() to construct. + private ConcatenateExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConcatenateExpression() { + dimensionNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + delimiter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConcatenateExpression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConcatenateExpression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensionNames_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + delimiter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionNames_ = dimensionNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder + .class); + } + + public static final int DIMENSION_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList dimensionNames_; + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @return A list containing the dimensionNames. + */ + public com.google.protobuf.ProtocolStringList getDimensionNamesList() { + return dimensionNames_; + } + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @return The count of dimensionNames. + */ + public int getDimensionNamesCount() { + return dimensionNames_.size(); + } + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the element to return. + * @return The dimensionNames at the given index. + */ + public java.lang.String getDimensionNames(int index) { + return dimensionNames_.get(index); + } + /** + * + * + *
+     * Names of dimensions. The names must refer back to names in the dimensions
+     * field of the request.
+     * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dimensionNames at the given index. + */ + public com.google.protobuf.ByteString getDimensionNamesBytes(int index) { + return dimensionNames_.getByteString(index); + } + + public static final int DELIMITER_FIELD_NUMBER = 2; + private volatile java.lang.Object delimiter_; + /** + * + * + *
+     * The delimiter placed between dimension names.
+     * Delimiters are often single characters such as "|" or "," but can be
+     * longer strings. If a dimension value contains the delimiter, both will be
+     * present in response with no distinction. For example if dimension 1 value
+     * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+     * response will contain "US,FR,JP".
+     * 
+ * + * string delimiter = 2; + * + * @return The delimiter. + */ + @java.lang.Override + public java.lang.String getDelimiter() { + java.lang.Object ref = delimiter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + delimiter_ = s; + return s; + } + } + /** + * + * + *
+     * The delimiter placed between dimension names.
+     * Delimiters are often single characters such as "|" or "," but can be
+     * longer strings. If a dimension value contains the delimiter, both will be
+     * present in response with no distinction. For example if dimension 1 value
+     * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+     * response will contain "US,FR,JP".
+     * 
+ * + * string delimiter = 2; + * + * @return The bytes for delimiter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelimiterBytes() { + java.lang.Object ref = delimiter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + delimiter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensionNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dimensionNames_.getRaw(i)); + } + if (!getDelimiterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, delimiter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < dimensionNames_.size(); i++) { + dataSize += computeStringSizeNoTag(dimensionNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDimensionNamesList().size(); + } + if (!getDelimiterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, delimiter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression other = + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) obj; + + if (!getDimensionNamesList().equals(other.getDimensionNamesList())) return false; + if (!getDelimiter().equals(other.getDelimiter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDimensionNamesCount() > 0) { + hash = (37 * hash) + DIMENSION_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDimensionNamesList().hashCode(); + } + hash = (37 * hash) + DELIMITER_FIELD_NUMBER; + hash = (53 * hash) + getDelimiter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder + .class); + } + + // Construct using + // com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dimensionNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + delimiter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression build() { + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + buildPartial() { + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression result = + new com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + dimensionNames_ = dimensionNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensionNames_ = dimensionNames_; + result.delimiter_ = delimiter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) { + return mergeFrom( + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression other) { + if (other + == com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance()) return this; + if (!other.dimensionNames_.isEmpty()) { + if (dimensionNames_.isEmpty()) { + dimensionNames_ = other.dimensionNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionNamesIsMutable(); + dimensionNames_.addAll(other.dimensionNames_); + } + onChanged(); + } + if (!other.getDelimiter().isEmpty()) { + delimiter_ = other.delimiter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList dimensionNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDimensionNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensionNames_ = new com.google.protobuf.LazyStringArrayList(dimensionNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @return A list containing the dimensionNames. + */ + public com.google.protobuf.ProtocolStringList getDimensionNamesList() { + return dimensionNames_.getUnmodifiableView(); + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @return The count of dimensionNames. + */ + public int getDimensionNamesCount() { + return dimensionNames_.size(); + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the element to return. + * @return The dimensionNames at the given index. + */ + public java.lang.String getDimensionNames(int index) { + return dimensionNames_.get(index); + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the dimensionNames at the given index. + */ + public com.google.protobuf.ByteString getDimensionNamesBytes(int index) { + return dimensionNames_.getByteString(index); + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param index The index to set the value at. + * @param value The dimensionNames to set. + * @return This builder for chaining. + */ + public Builder setDimensionNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionNamesIsMutable(); + dimensionNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param value The dimensionNames to add. + * @return This builder for chaining. + */ + public Builder addDimensionNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionNamesIsMutable(); + dimensionNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param values The dimensionNames to add. + * @return This builder for chaining. + */ + public Builder addAllDimensionNames(java.lang.Iterable values) { + ensureDimensionNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionNames_); + onChanged(); + return this; + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearDimensionNames() { + dimensionNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Names of dimensions. The names must refer back to names in the dimensions
+       * field of the request.
+       * 
+ * + * repeated string dimension_names = 1; + * + * @param value The bytes of the dimensionNames to add. + * @return This builder for chaining. + */ + public Builder addDimensionNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDimensionNamesIsMutable(); + dimensionNames_.add(value); + onChanged(); + return this; + } + + private java.lang.Object delimiter_ = ""; + /** + * + * + *
+       * The delimiter placed between dimension names.
+       * Delimiters are often single characters such as "|" or "," but can be
+       * longer strings. If a dimension value contains the delimiter, both will be
+       * present in response with no distinction. For example if dimension 1 value
+       * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+       * response will contain "US,FR,JP".
+       * 
+ * + * string delimiter = 2; + * + * @return The delimiter. + */ + public java.lang.String getDelimiter() { + java.lang.Object ref = delimiter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + delimiter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The delimiter placed between dimension names.
+       * Delimiters are often single characters such as "|" or "," but can be
+       * longer strings. If a dimension value contains the delimiter, both will be
+       * present in response with no distinction. For example if dimension 1 value
+       * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+       * response will contain "US,FR,JP".
+       * 
+ * + * string delimiter = 2; + * + * @return The bytes for delimiter. + */ + public com.google.protobuf.ByteString getDelimiterBytes() { + java.lang.Object ref = delimiter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + delimiter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The delimiter placed between dimension names.
+       * Delimiters are often single characters such as "|" or "," but can be
+       * longer strings. If a dimension value contains the delimiter, both will be
+       * present in response with no distinction. For example if dimension 1 value
+       * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+       * response will contain "US,FR,JP".
+       * 
+ * + * string delimiter = 2; + * + * @param value The delimiter to set. + * @return This builder for chaining. + */ + public Builder setDelimiter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + delimiter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The delimiter placed between dimension names.
+       * Delimiters are often single characters such as "|" or "," but can be
+       * longer strings. If a dimension value contains the delimiter, both will be
+       * present in response with no distinction. For example if dimension 1 value
+       * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+       * response will contain "US,FR,JP".
+       * 
+ * + * string delimiter = 2; + * + * @return This builder for chaining. + */ + public Builder clearDelimiter() { + + delimiter_ = getDefaultInstance().getDelimiter(); + onChanged(); + return this; + } + /** + * + * + *
+       * The delimiter placed between dimension names.
+       * Delimiters are often single characters such as "|" or "," but can be
+       * longer strings. If a dimension value contains the delimiter, both will be
+       * present in response with no distinction. For example if dimension 1 value
+       * = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the
+       * response will contain "US,FR,JP".
+       * 
+ * + * string delimiter = 2; + * + * @param value The bytes for delimiter to set. + * @return This builder for chaining. + */ + public Builder setDelimiterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + delimiter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + private static final com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression(); + } + + public static com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConcatenateExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConcatenateExpression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int oneExpressionCase_ = 0; + private java.lang.Object oneExpression_; + + public enum OneExpressionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + LOWER_CASE(4), + UPPER_CASE(5), + CONCATENATE(6), + ONEEXPRESSION_NOT_SET(0); + private final int value; + + private OneExpressionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneExpressionCase valueOf(int value) { + return forNumber(value); + } + + public static OneExpressionCase forNumber(int value) { + switch (value) { + case 4: + return LOWER_CASE; + case 5: + return UPPER_CASE; + case 6: + return CONCATENATE; + case 0: + return ONEEXPRESSION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneExpressionCase getOneExpressionCase() { + return OneExpressionCase.forNumber(oneExpressionCase_); + } + + public static final int LOWER_CASE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return Whether the lowerCase field is set. + */ + @java.lang.Override + public boolean hasLowerCase() { + return oneExpressionCase_ == 4; + } + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return The lowerCase. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getLowerCase() { + if (oneExpressionCase_ == 4) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.getDefaultInstance(); + } + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getLowerCaseOrBuilder() { + if (oneExpressionCase_ == 4) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.getDefaultInstance(); + } + + public static final int UPPER_CASE_FIELD_NUMBER = 5; + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return Whether the upperCase field is set. + */ + @java.lang.Override + public boolean hasUpperCase() { + return oneExpressionCase_ == 5; + } + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return The upperCase. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getUpperCase() { + if (oneExpressionCase_ == 5) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.getDefaultInstance(); + } + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getUpperCaseOrBuilder() { + if (oneExpressionCase_ == 5) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.getDefaultInstance(); + } + + public static final int CONCATENATE_FIELD_NUMBER = 6; + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return Whether the concatenate field is set. + */ + @java.lang.Override + public boolean hasConcatenate() { + return oneExpressionCase_ == 6; + } + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return The concatenate. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + getConcatenate() { + if (oneExpressionCase_ == 6) { + return (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder + getConcatenateOrBuilder() { + if (oneExpressionCase_ == 6) { + return (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oneExpressionCase_ == 4) { + output.writeMessage( + 4, (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_); + } + if (oneExpressionCase_ == 5) { + output.writeMessage( + 5, (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_); + } + if (oneExpressionCase_ == 6) { + output.writeMessage( + 6, + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneExpressionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_); + } + if (oneExpressionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) oneExpression_); + } + if (oneExpressionCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DimensionExpression)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionExpression other = + (com.google.analytics.data.v1beta.DimensionExpression) obj; + + if (!getOneExpressionCase().equals(other.getOneExpressionCase())) return false; + switch (oneExpressionCase_) { + case 4: + if (!getLowerCase().equals(other.getLowerCase())) return false; + break; + case 5: + if (!getUpperCase().equals(other.getUpperCase())) return false; + break; + case 6: + if (!getConcatenate().equals(other.getConcatenate())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (oneExpressionCase_) { + case 4: + hash = (37 * hash) + LOWER_CASE_FIELD_NUMBER; + hash = (53 * hash) + getLowerCase().hashCode(); + break; + case 5: + hash = (37 * hash) + UPPER_CASE_FIELD_NUMBER; + hash = (53 * hash) + getUpperCase().hashCode(); + break; + case 6: + hash = (37 * hash) + CONCATENATE_FIELD_NUMBER; + hash = (53 * hash) + getConcatenate().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionExpression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.DimensionExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Used to express a dimension which is the result of a formula of multiple
+   * dimensions. Example usages:
+   * 1) lower_case(dimension)
+   * 2) concatenate(dimension1, symbol, dimension2).
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionExpression} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionExpression) + com.google.analytics.data.v1beta.DimensionExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionExpression.class, + com.google.analytics.data.v1beta.DimensionExpression.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.DimensionExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + oneExpressionCase_ = 0; + oneExpression_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionExpression.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression build() { + com.google.analytics.data.v1beta.DimensionExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression buildPartial() { + com.google.analytics.data.v1beta.DimensionExpression result = + new com.google.analytics.data.v1beta.DimensionExpression(this); + if (oneExpressionCase_ == 4) { + if (lowerCaseBuilder_ == null) { + result.oneExpression_ = oneExpression_; + } else { + result.oneExpression_ = lowerCaseBuilder_.build(); + } + } + if (oneExpressionCase_ == 5) { + if (upperCaseBuilder_ == null) { + result.oneExpression_ = oneExpression_; + } else { + result.oneExpression_ = upperCaseBuilder_.build(); + } + } + if (oneExpressionCase_ == 6) { + if (concatenateBuilder_ == null) { + result.oneExpression_ = oneExpression_; + } else { + result.oneExpression_ = concatenateBuilder_.build(); + } + } + result.oneExpressionCase_ = oneExpressionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DimensionExpression) { + return mergeFrom((com.google.analytics.data.v1beta.DimensionExpression) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.DimensionExpression other) { + if (other == com.google.analytics.data.v1beta.DimensionExpression.getDefaultInstance()) + return this; + switch (other.getOneExpressionCase()) { + case LOWER_CASE: + { + mergeLowerCase(other.getLowerCase()); + break; + } + case UPPER_CASE: + { + mergeUpperCase(other.getUpperCase()); + break; + } + case CONCATENATE: + { + mergeConcatenate(other.getConcatenate()); + break; + } + case ONEEXPRESSION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionExpression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.DimensionExpression) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneExpressionCase_ = 0; + private java.lang.Object oneExpression_; + + public OneExpressionCase getOneExpressionCase() { + return OneExpressionCase.forNumber(oneExpressionCase_); + } + + public Builder clearOneExpression() { + oneExpressionCase_ = 0; + oneExpression_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder> + lowerCaseBuilder_; + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return Whether the lowerCase field is set. + */ + @java.lang.Override + public boolean hasLowerCase() { + return oneExpressionCase_ == 4; + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return The lowerCase. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getLowerCase() { + if (lowerCaseBuilder_ == null) { + if (oneExpressionCase_ == 4) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } else { + if (oneExpressionCase_ == 4) { + return lowerCaseBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + public Builder setLowerCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression value) { + if (lowerCaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneExpression_ = value; + onChanged(); + } else { + lowerCaseBuilder_.setMessage(value); + } + oneExpressionCase_ = 4; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + public Builder setLowerCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + builderForValue) { + if (lowerCaseBuilder_ == null) { + oneExpression_ = builderForValue.build(); + onChanged(); + } else { + lowerCaseBuilder_.setMessage(builderForValue.build()); + } + oneExpressionCase_ = 4; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + public Builder mergeLowerCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression value) { + if (lowerCaseBuilder_ == null) { + if (oneExpressionCase_ == 4 + && oneExpression_ + != com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance()) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.newBuilder( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_) + .mergeFrom(value) + .buildPartial(); + } else { + oneExpression_ = value; + } + onChanged(); + } else { + if (oneExpressionCase_ == 4) { + lowerCaseBuilder_.mergeFrom(value); + } + lowerCaseBuilder_.setMessage(value); + } + oneExpressionCase_ = 4; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + public Builder clearLowerCase() { + if (lowerCaseBuilder_ == null) { + if (oneExpressionCase_ == 4) { + oneExpressionCase_ = 0; + oneExpression_ = null; + onChanged(); + } + } else { + if (oneExpressionCase_ == 4) { + oneExpressionCase_ = 0; + oneExpression_ = null; + } + lowerCaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + getLowerCaseBuilder() { + return getLowerCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getLowerCaseOrBuilder() { + if ((oneExpressionCase_ == 4) && (lowerCaseBuilder_ != null)) { + return lowerCaseBuilder_.getMessageOrBuilder(); + } else { + if (oneExpressionCase_ == 4) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to convert a dimension value to lower case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder> + getLowerCaseFieldBuilder() { + if (lowerCaseBuilder_ == null) { + if (!(oneExpressionCase_ == 4)) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + lowerCaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder>( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_, + getParentForChildren(), + isClean()); + oneExpression_ = null; + } + oneExpressionCase_ = 4; + onChanged(); + ; + return lowerCaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder> + upperCaseBuilder_; + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return Whether the upperCase field is set. + */ + @java.lang.Override + public boolean hasUpperCase() { + return oneExpressionCase_ == 5; + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return The upperCase. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getUpperCase() { + if (upperCaseBuilder_ == null) { + if (oneExpressionCase_ == 5) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } else { + if (oneExpressionCase_ == 5) { + return upperCaseBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + public Builder setUpperCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression value) { + if (upperCaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneExpression_ = value; + onChanged(); + } else { + upperCaseBuilder_.setMessage(value); + } + oneExpressionCase_ = 5; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + public Builder setUpperCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + builderForValue) { + if (upperCaseBuilder_ == null) { + oneExpression_ = builderForValue.build(); + onChanged(); + } else { + upperCaseBuilder_.setMessage(builderForValue.build()); + } + oneExpressionCase_ = 5; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + public Builder mergeUpperCase( + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression value) { + if (upperCaseBuilder_ == null) { + if (oneExpressionCase_ == 5 + && oneExpression_ + != com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance()) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.newBuilder( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_) + .mergeFrom(value) + .buildPartial(); + } else { + oneExpression_ = value; + } + onChanged(); + } else { + if (oneExpressionCase_ == 5) { + upperCaseBuilder_.mergeFrom(value); + } + upperCaseBuilder_.setMessage(value); + } + oneExpressionCase_ = 5; + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + public Builder clearUpperCase() { + if (upperCaseBuilder_ == null) { + if (oneExpressionCase_ == 5) { + oneExpressionCase_ = 0; + oneExpression_ = null; + onChanged(); + } + } else { + if (oneExpressionCase_ == 5) { + oneExpressionCase_ = 0; + oneExpression_ = null; + } + upperCaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder + getUpperCaseBuilder() { + return getUpperCaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getUpperCaseOrBuilder() { + if ((oneExpressionCase_ == 5) && (upperCaseBuilder_ != null)) { + return upperCaseBuilder_.getMessageOrBuilder(); + } else { + if (oneExpressionCase_ == 5) { + return (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to convert a dimension value to upper case.
+     * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder> + getUpperCaseFieldBuilder() { + if (upperCaseBuilder_ == null) { + if (!(oneExpressionCase_ == 5)) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression + .getDefaultInstance(); + } + upperCaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder>( + (com.google.analytics.data.v1beta.DimensionExpression.CaseExpression) + oneExpression_, + getParentForChildren(), + isClean()); + oneExpression_ = null; + } + oneExpressionCase_ = 5; + onChanged(); + ; + return upperCaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder> + concatenateBuilder_; + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return Whether the concatenate field is set. + */ + @java.lang.Override + public boolean hasConcatenate() { + return oneExpressionCase_ == 6; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return The concatenate. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + getConcatenate() { + if (concatenateBuilder_ == null) { + if (oneExpressionCase_ == 6) { + return (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } else { + if (oneExpressionCase_ == 6) { + return concatenateBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + public Builder setConcatenate( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression value) { + if (concatenateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneExpression_ = value; + onChanged(); + } else { + concatenateBuilder_.setMessage(value); + } + oneExpressionCase_ = 6; + return this; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + public Builder setConcatenate( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder + builderForValue) { + if (concatenateBuilder_ == null) { + oneExpression_ = builderForValue.build(); + onChanged(); + } else { + concatenateBuilder_.setMessage(builderForValue.build()); + } + oneExpressionCase_ = 6; + return this; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + public Builder mergeConcatenate( + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression value) { + if (concatenateBuilder_ == null) { + if (oneExpressionCase_ == 6 + && oneExpression_ + != com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance()) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.newBuilder( + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_) + .mergeFrom(value) + .buildPartial(); + } else { + oneExpression_ = value; + } + onChanged(); + } else { + if (oneExpressionCase_ == 6) { + concatenateBuilder_.mergeFrom(value); + } + concatenateBuilder_.setMessage(value); + } + oneExpressionCase_ = 6; + return this; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + public Builder clearConcatenate() { + if (concatenateBuilder_ == null) { + if (oneExpressionCase_ == 6) { + oneExpressionCase_ = 0; + oneExpression_ = null; + onChanged(); + } + } else { + if (oneExpressionCase_ == 6) { + oneExpressionCase_ = 0; + oneExpression_ = null; + } + concatenateBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder + getConcatenateBuilder() { + return getConcatenateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder + getConcatenateOrBuilder() { + if ((oneExpressionCase_ == 6) && (concatenateBuilder_ != null)) { + return concatenateBuilder_.getMessageOrBuilder(); + } else { + if (oneExpressionCase_ == 6) { + return (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_; + } + return com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Used to combine dimension values to a single dimension.
+     * For example, dimension "country, city": concatenate(country, ", ", city).
+     * 
+ * + * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder> + getConcatenateFieldBuilder() { + if (concatenateBuilder_ == null) { + if (!(oneExpressionCase_ == 6)) { + oneExpression_ = + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression + .getDefaultInstance(); + } + concatenateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression, + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression.Builder, + com.google.analytics.data.v1beta.DimensionExpression + .ConcatenateExpressionOrBuilder>( + (com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression) + oneExpression_, + getParentForChildren(), + isClean()); + oneExpression_ = null; + } + oneExpressionCase_ = 6; + onChanged(); + ; + return concatenateBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionExpression) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionExpression) + private static final com.google.analytics.data.v1beta.DimensionExpression DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DimensionExpression(); + } + + public static com.google.analytics.data.v1beta.DimensionExpression getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DimensionExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DimensionExpression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionExpression getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpressionOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpressionOrBuilder.java new file mode 100644 index 00000000..2f811745 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpressionOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DimensionExpressionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionExpression) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return Whether the lowerCase field is set. + */ + boolean hasLowerCase(); + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + * + * @return The lowerCase. + */ + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getLowerCase(); + /** + * + * + *
+   * Used to convert a dimension value to lower case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression lower_case = 4; + */ + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getLowerCaseOrBuilder(); + + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return Whether the upperCase field is set. + */ + boolean hasUpperCase(); + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + * + * @return The upperCase. + */ + com.google.analytics.data.v1beta.DimensionExpression.CaseExpression getUpperCase(); + /** + * + * + *
+   * Used to convert a dimension value to upper case.
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.CaseExpression upper_case = 5; + */ + com.google.analytics.data.v1beta.DimensionExpression.CaseExpressionOrBuilder + getUpperCaseOrBuilder(); + + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return Whether the concatenate field is set. + */ + boolean hasConcatenate(); + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + * + * @return The concatenate. + */ + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression getConcatenate(); + /** + * + * + *
+   * Used to combine dimension values to a single dimension.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression.ConcatenateExpression concatenate = 6; + * + */ + com.google.analytics.data.v1beta.DimensionExpression.ConcatenateExpressionOrBuilder + getConcatenateOrBuilder(); + + public com.google.analytics.data.v1beta.DimensionExpression.OneExpressionCase + getOneExpressionCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeader.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeader.java new file mode 100644 index 00000000..7742a397 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeader.java @@ -0,0 +1,641 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionHeader} + */ +public final class DimensionHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionHeader) + DimensionHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use DimensionHeader.newBuilder() to construct. + private DimensionHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DimensionHeader() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DimensionHeader(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DimensionHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionHeader.class, + com.google.analytics.data.v1beta.DimensionHeader.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The dimension's name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The dimension's name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DimensionHeader)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionHeader other = + (com.google.analytics.data.v1beta.DimensionHeader) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.DimensionHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionHeader) + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionHeader.class, + com.google.analytics.data.v1beta.DimensionHeader.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.DimensionHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader build() { + com.google.analytics.data.v1beta.DimensionHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader buildPartial() { + com.google.analytics.data.v1beta.DimensionHeader result = + new com.google.analytics.data.v1beta.DimensionHeader(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DimensionHeader) { + return mergeFrom((com.google.analytics.data.v1beta.DimensionHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.DimensionHeader other) { + if (other == com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.DimensionHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The dimension's name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The dimension's name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The dimension's name.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension's name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension's name.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionHeader) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionHeader) + private static final com.google.analytics.data.v1beta.DimensionHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DimensionHeader(); + } + + public static com.google.analytics.data.v1beta.DimensionHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DimensionHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DimensionHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeaderOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeaderOrBuilder.java new file mode 100644 index 00000000..75b20154 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeaderOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DimensionHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The dimension's name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The dimension's name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadata.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadata.java new file mode 100644 index 00000000..197014d0 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadata.java @@ -0,0 +1,1417 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Explains a dimension.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionMetadata} + */ +public final class DimensionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionMetadata) + DimensionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DimensionMetadata.newBuilder() to construct. + private DimensionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DimensionMetadata() { + apiName_ = ""; + uiName_ = ""; + description_ = ""; + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DimensionMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DimensionMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uiName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deprecatedApiNames_.add(s); + break; + } + case 40: + { + customDefinition_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = deprecatedApiNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionMetadata.class, + com.google.analytics.data.v1beta.DimensionMetadata.Builder.class); + } + + public static final int API_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object apiName_; + /** + * + * + *
+   * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+   * example, `eventName`.
+   * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + @java.lang.Override + public java.lang.String getApiName() { + java.lang.Object ref = apiName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiName_ = s; + return s; + } + } + /** + * + * + *
+   * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+   * example, `eventName`.
+   * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiNameBytes() { + java.lang.Object ref = apiName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UI_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object uiName_; + /** + * + * + *
+   * This dimension's name within the Google Analytics user interface. For
+   * example, `Event name`.
+   * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + @java.lang.Override + public java.lang.String getUiName() { + java.lang.Object ref = uiName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uiName_ = s; + return s; + } + } + /** + * + * + *
+   * This dimension's name within the Google Analytics user interface. For
+   * example, `Event name`.
+   * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUiNameBytes() { + java.lang.Object ref = uiName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of how this dimension is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of how this dimension is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPRECATED_API_NAMES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList deprecatedApiNames_; + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + public com.google.protobuf.ProtocolStringList getDeprecatedApiNamesList() { + return deprecatedApiNames_; + } + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + public int getDeprecatedApiNamesCount() { + return deprecatedApiNames_.size(); + } + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + public java.lang.String getDeprecatedApiNames(int index) { + return deprecatedApiNames_.get(index); + } + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + public com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index) { + return deprecatedApiNames_.getByteString(index); + } + + public static final int CUSTOM_DEFINITION_FIELD_NUMBER = 5; + private boolean customDefinition_; + /** + * + * + *
+   * True if the dimension is a custom dimension for this property.
+   * 
+ * + * bool custom_definition = 5; + * + * @return The customDefinition. + */ + @java.lang.Override + public boolean getCustomDefinition() { + return customDefinition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getApiNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, apiName_); + } + if (!getUiNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uiName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < deprecatedApiNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deprecatedApiNames_.getRaw(i)); + } + if (customDefinition_ != false) { + output.writeBool(5, customDefinition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getApiNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, apiName_); + } + if (!getUiNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uiName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + { + int dataSize = 0; + for (int i = 0; i < deprecatedApiNames_.size(); i++) { + dataSize += computeStringSizeNoTag(deprecatedApiNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeprecatedApiNamesList().size(); + } + if (customDefinition_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, customDefinition_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DimensionMetadata)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionMetadata other = + (com.google.analytics.data.v1beta.DimensionMetadata) obj; + + if (!getApiName().equals(other.getApiName())) return false; + if (!getUiName().equals(other.getUiName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDeprecatedApiNamesList().equals(other.getDeprecatedApiNamesList())) return false; + if (getCustomDefinition() != other.getCustomDefinition()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + API_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApiName().hashCode(); + hash = (37 * hash) + UI_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUiName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getDeprecatedApiNamesCount() > 0) { + hash = (37 * hash) + DEPRECATED_API_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDeprecatedApiNamesList().hashCode(); + } + hash = (37 * hash) + CUSTOM_DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCustomDefinition()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.DimensionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Explains a dimension.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionMetadata) + com.google.analytics.data.v1beta.DimensionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionMetadata.class, + com.google.analytics.data.v1beta.DimensionMetadata.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.DimensionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + apiName_ = ""; + + uiName_ = ""; + + description_ = ""; + + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + customDefinition_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadata getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadata build() { + com.google.analytics.data.v1beta.DimensionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadata buildPartial() { + com.google.analytics.data.v1beta.DimensionMetadata result = + new com.google.analytics.data.v1beta.DimensionMetadata(this); + int from_bitField0_ = bitField0_; + result.apiName_ = apiName_; + result.uiName_ = uiName_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = deprecatedApiNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deprecatedApiNames_ = deprecatedApiNames_; + result.customDefinition_ = customDefinition_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DimensionMetadata) { + return mergeFrom((com.google.analytics.data.v1beta.DimensionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.DimensionMetadata other) { + if (other == com.google.analytics.data.v1beta.DimensionMetadata.getDefaultInstance()) + return this; + if (!other.getApiName().isEmpty()) { + apiName_ = other.apiName_; + onChanged(); + } + if (!other.getUiName().isEmpty()) { + uiName_ = other.uiName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.deprecatedApiNames_.isEmpty()) { + if (deprecatedApiNames_.isEmpty()) { + deprecatedApiNames_ = other.deprecatedApiNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.addAll(other.deprecatedApiNames_); + } + onChanged(); + } + if (other.getCustomDefinition() != false) { + setCustomDefinition(other.getCustomDefinition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.DimensionMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object apiName_ = ""; + /** + * + * + *
+     * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+     * example, `eventName`.
+     * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + public java.lang.String getApiName() { + java.lang.Object ref = apiName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+     * example, `eventName`.
+     * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + public com.google.protobuf.ByteString getApiNameBytes() { + java.lang.Object ref = apiName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+     * example, `eventName`.
+     * 
+ * + * string api_name = 1; + * + * @param value The apiName to set. + * @return This builder for chaining. + */ + public Builder setApiName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+     * example, `eventName`.
+     * 
+ * + * string api_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearApiName() { + + apiName_ = getDefaultInstance().getApiName(); + onChanged(); + return this; + } + /** + * + * + *
+     * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+     * example, `eventName`.
+     * 
+ * + * string api_name = 1; + * + * @param value The bytes for apiName to set. + * @return This builder for chaining. + */ + public Builder setApiNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uiName_ = ""; + /** + * + * + *
+     * This dimension's name within the Google Analytics user interface. For
+     * example, `Event name`.
+     * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + public java.lang.String getUiName() { + java.lang.Object ref = uiName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uiName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This dimension's name within the Google Analytics user interface. For
+     * example, `Event name`.
+     * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + public com.google.protobuf.ByteString getUiNameBytes() { + java.lang.Object ref = uiName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This dimension's name within the Google Analytics user interface. For
+     * example, `Event name`.
+     * 
+ * + * string ui_name = 2; + * + * @param value The uiName to set. + * @return This builder for chaining. + */ + public Builder setUiName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uiName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This dimension's name within the Google Analytics user interface. For
+     * example, `Event name`.
+     * 
+ * + * string ui_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearUiName() { + + uiName_ = getDefaultInstance().getUiName(); + onChanged(); + return this; + } + /** + * + * + *
+     * This dimension's name within the Google Analytics user interface. For
+     * example, `Event name`.
+     * 
+ * + * string ui_name = 2; + * + * @param value The bytes for uiName to set. + * @return This builder for chaining. + */ + public Builder setUiNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uiName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of how this dimension is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of how this dimension is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of how this dimension is used and calculated.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of how this dimension is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of how this dimension is used and calculated.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList deprecatedApiNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDeprecatedApiNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = new com.google.protobuf.LazyStringArrayList(deprecatedApiNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + public com.google.protobuf.ProtocolStringList getDeprecatedApiNamesList() { + return deprecatedApiNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + public int getDeprecatedApiNamesCount() { + return deprecatedApiNames_.size(); + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + public java.lang.String getDeprecatedApiNames(int index) { + return deprecatedApiNames_.get(index); + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + public com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index) { + return deprecatedApiNames_.getByteString(index); + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index to set the value at. + * @param value The deprecatedApiNames to set. + * @return This builder for chaining. + */ + public Builder setDeprecatedApiNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param value The deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addDeprecatedApiNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param values The deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addAllDeprecatedApiNames(java.lang.Iterable values) { + ensureDeprecatedApiNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deprecatedApiNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return This builder for chaining. + */ + public Builder clearDeprecatedApiNames() { + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this dimension. If populated, this
+     * dimension is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the dimension will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param value The bytes of the deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addDeprecatedApiNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.add(value); + onChanged(); + return this; + } + + private boolean customDefinition_; + /** + * + * + *
+     * True if the dimension is a custom dimension for this property.
+     * 
+ * + * bool custom_definition = 5; + * + * @return The customDefinition. + */ + @java.lang.Override + public boolean getCustomDefinition() { + return customDefinition_; + } + /** + * + * + *
+     * True if the dimension is a custom dimension for this property.
+     * 
+ * + * bool custom_definition = 5; + * + * @param value The customDefinition to set. + * @return This builder for chaining. + */ + public Builder setCustomDefinition(boolean value) { + + customDefinition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if the dimension is a custom dimension for this property.
+     * 
+ * + * bool custom_definition = 5; + * + * @return This builder for chaining. + */ + public Builder clearCustomDefinition() { + + customDefinition_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionMetadata) + private static final com.google.analytics.data.v1beta.DimensionMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DimensionMetadata(); + } + + public static com.google.analytics.data.v1beta.DimensionMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DimensionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DimensionMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadataOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadataOrBuilder.java new file mode 100644 index 00000000..a3aaba90 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadataOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DimensionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+   * example, `eventName`.
+   * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + java.lang.String getApiName(); + /** + * + * + *
+   * This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For
+   * example, `eventName`.
+   * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + com.google.protobuf.ByteString getApiNameBytes(); + + /** + * + * + *
+   * This dimension's name within the Google Analytics user interface. For
+   * example, `Event name`.
+   * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + java.lang.String getUiName(); + /** + * + * + *
+   * This dimension's name within the Google Analytics user interface. For
+   * example, `Event name`.
+   * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + com.google.protobuf.ByteString getUiNameBytes(); + + /** + * + * + *
+   * Description of how this dimension is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of how this dimension is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + java.util.List getDeprecatedApiNamesList(); + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + int getDeprecatedApiNamesCount(); + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + java.lang.String getDeprecatedApiNames(int index); + /** + * + * + *
+   * Still usable but deprecated names for this dimension. If populated, this
+   * dimension is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the dimension will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index); + + /** + * + * + *
+   * True if the dimension is a custom dimension for this property.
+   * 
+ * + * bool custom_definition = 5; + * + * @return The customDefinition. + */ + boolean getCustomDefinition(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionOrBuilder.java new file mode 100644 index 00000000..26ab4db3 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DimensionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Dimension) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the dimension. See the [API
+   * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+   * for the list of dimension names.
+   * If `dimensionExpression` is specified, `name` can be any string that you
+   * would like within the allowed character set. For example if a
+   * `dimensionExpression` concatenates `country` and `city`, you could call
+   * that dimension `countryAndCity`. Dimension names that you choose must match
+   * the regular expression "^[a-zA-Z0-9_]$".
+   * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+   * `dimensionExpression`, and `pivots`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the dimension. See the [API
+   * Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions)
+   * for the list of dimension names.
+   * If `dimensionExpression` is specified, `name` can be any string that you
+   * would like within the allowed character set. For example if a
+   * `dimensionExpression` concatenates `country` and `city`, you could call
+   * that dimension `countryAndCity`. Dimension names that you choose must match
+   * the regular expression "^[a-zA-Z0-9_]$".
+   * Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`,
+   * `dimensionExpression`, and `pivots`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return Whether the dimensionExpression field is set. + */ + boolean hasDimensionExpression(); + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + * + * @return The dimensionExpression. + */ + com.google.analytics.data.v1beta.DimensionExpression getDimensionExpression(); + /** + * + * + *
+   * One dimension can be the result of an expression of multiple dimensions.
+   * For example, dimension "country, city": concatenate(country, ", ", city).
+   * 
+ * + * .google.analytics.data.v1beta.DimensionExpression dimension_expression = 2; + */ + com.google.analytics.data.v1beta.DimensionExpressionOrBuilder getDimensionExpressionOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValue.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValue.java new file mode 100644 index 00000000..8c462e2a --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValue.java @@ -0,0 +1,736 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The value of a dimension.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionValue} + */ +public final class DimensionValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.DimensionValue) + DimensionValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use DimensionValue.newBuilder() to construct. + private DimensionValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DimensionValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DimensionValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DimensionValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + oneValueCase_ = 1; + oneValue_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionValue.class, + com.google.analytics.data.v1beta.DimensionValue.Builder.class); + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public enum OneValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(1), + ONEVALUE_NOT_SET(0); + private final int value; + + private OneValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneValueCase valueOf(int value) { + return forNumber(value); + } + + public static OneValueCase forNumber(int value) { + switch (value) { + case 1: + return VALUE; + case 0: + return ONEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public static final int VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Value as a string if the dimension type is a string.
+   * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (oneValueCase_ == 1) { + ref = oneValue_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneValueCase_ == 1) { + oneValue_ = s; + } + return s; + } + } + /** + * + * + *
+   * Value as a string if the dimension type is a string.
+   * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (oneValueCase_ == 1) { + ref = oneValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneValueCase_ == 1) { + oneValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oneValueCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, oneValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneValueCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, oneValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.DimensionValue)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.DimensionValue other = + (com.google.analytics.data.v1beta.DimensionValue) obj; + + if (!getOneValueCase().equals(other.getOneValueCase())) return false; + switch (oneValueCase_) { + case 1: + if (!getValue().equals(other.getValue())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (oneValueCase_) { + case 1: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.DimensionValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.DimensionValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The value of a dimension.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.DimensionValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.DimensionValue) + com.google.analytics.data.v1beta.DimensionValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.DimensionValue.class, + com.google.analytics.data.v1beta.DimensionValue.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.DimensionValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + oneValueCase_ = 0; + oneValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_DimensionValue_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue build() { + com.google.analytics.data.v1beta.DimensionValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue buildPartial() { + com.google.analytics.data.v1beta.DimensionValue result = + new com.google.analytics.data.v1beta.DimensionValue(this); + if (oneValueCase_ == 1) { + result.oneValue_ = oneValue_; + } + result.oneValueCase_ = oneValueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.DimensionValue) { + return mergeFrom((com.google.analytics.data.v1beta.DimensionValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.DimensionValue other) { + if (other == com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance()) + return this; + switch (other.getOneValueCase()) { + case VALUE: + { + oneValueCase_ = 1; + oneValue_ = other.oneValue_; + onChanged(); + break; + } + case ONEVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.DimensionValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.DimensionValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public Builder clearOneValue() { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Value as a string if the dimension type is a string.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (oneValueCase_ == 1) { + ref = oneValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneValueCase_ == 1) { + oneValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Value as a string if the dimension type is a string.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (oneValueCase_ == 1) { + ref = oneValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneValueCase_ == 1) { + oneValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Value as a string if the dimension type is a string.
+     * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneValueCase_ = 1; + oneValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Value as a string if the dimension type is a string.
+     * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + if (oneValueCase_ == 1) { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Value as a string if the dimension type is a string.
+     * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneValueCase_ = 1; + oneValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.DimensionValue) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.DimensionValue) + private static final com.google.analytics.data.v1beta.DimensionValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.DimensionValue(); + } + + public static com.google.analytics.data.v1beta.DimensionValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DimensionValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DimensionValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValueOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValueOrBuilder.java new file mode 100644 index 00000000..6cfce726 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValueOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface DimensionValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.DimensionValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Value as a string if the dimension type is a string.
+   * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * Value as a string if the dimension type is a string.
+   * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + public com.google.analytics.data.v1beta.DimensionValue.OneValueCase getOneValueCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Filter.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Filter.java new file mode 100644 index 00000000..41a6c038 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Filter.java @@ -0,0 +1,6293 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * An expression to filter dimension or metric values.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter} + */ +public final class Filter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Filter) + FilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Filter.newBuilder() to construct. + private Filter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Filter() { + fieldName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Filter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Filter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + fieldName_ = s; + break; + } + case 26: + { + com.google.analytics.data.v1beta.Filter.StringFilter.Builder subBuilder = null; + if (oneFilterCase_ == 3) { + subBuilder = + ((com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_).toBuilder(); + } + oneFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.Filter.StringFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_); + oneFilter_ = subBuilder.buildPartial(); + } + oneFilterCase_ = 3; + break; + } + case 34: + { + com.google.analytics.data.v1beta.Filter.InListFilter.Builder subBuilder = null; + if (oneFilterCase_ == 4) { + subBuilder = + ((com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_).toBuilder(); + } + oneFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.Filter.InListFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_); + oneFilter_ = subBuilder.buildPartial(); + } + oneFilterCase_ = 4; + break; + } + case 42: + { + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder subBuilder = null; + if (oneFilterCase_ == 5) { + subBuilder = + ((com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_) + .toBuilder(); + } + oneFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.Filter.NumericFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_); + oneFilter_ = subBuilder.buildPartial(); + } + oneFilterCase_ = 5; + break; + } + case 50: + { + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder subBuilder = null; + if (oneFilterCase_ == 6) { + subBuilder = + ((com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_) + .toBuilder(); + } + oneFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.Filter.BetweenFilter.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_); + oneFilter_ = subBuilder.buildPartial(); + } + oneFilterCase_ = 6; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.class, + com.google.analytics.data.v1beta.Filter.Builder.class); + } + + public interface StringFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Filter.StringFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The match type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The enum numeric value on the wire for matchType. + */ + int getMatchTypeValue(); + /** + * + * + *
+     * The match type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The matchType. + */ + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType getMatchType(); + + /** + * + * + *
+     * The string value used for the matching.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * The string value used for the matching.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+     * If true, the string value is case sensitive.
+     * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + boolean getCaseSensitive(); + } + /** + * + * + *
+   * The filter for string
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.StringFilter} + */ + public static final class StringFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Filter.StringFilter) + StringFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use StringFilter.newBuilder() to construct. + private StringFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StringFilter() { + matchType_ = 0; + value_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StringFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StringFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + matchType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 24: + { + caseSensitive_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_StringFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.StringFilter.class, + com.google.analytics.data.v1beta.Filter.StringFilter.Builder.class); + } + + /** + * + * + *
+     * The match type of a string filter
+     * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.Filter.StringFilter.MatchType} + */ + public enum MatchType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified
+       * 
+ * + * MATCH_TYPE_UNSPECIFIED = 0; + */ + MATCH_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Exact match of the string value.
+       * 
+ * + * EXACT = 1; + */ + EXACT(1), + /** + * + * + *
+       * Begins with the string value.
+       * 
+ * + * BEGINS_WITH = 2; + */ + BEGINS_WITH(2), + /** + * + * + *
+       * Ends with the string value.
+       * 
+ * + * ENDS_WITH = 3; + */ + ENDS_WITH(3), + /** + * + * + *
+       * Contains the string value.
+       * 
+ * + * CONTAINS = 4; + */ + CONTAINS(4), + /** + * + * + *
+       * Full regular expression match with the string value.
+       * 
+ * + * FULL_REGEXP = 5; + */ + FULL_REGEXP(5), + /** + * + * + *
+       * Partial regular expression match with the string value.
+       * 
+ * + * PARTIAL_REGEXP = 6; + */ + PARTIAL_REGEXP(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified
+       * 
+ * + * MATCH_TYPE_UNSPECIFIED = 0; + */ + public static final int MATCH_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Exact match of the string value.
+       * 
+ * + * EXACT = 1; + */ + public static final int EXACT_VALUE = 1; + /** + * + * + *
+       * Begins with the string value.
+       * 
+ * + * BEGINS_WITH = 2; + */ + public static final int BEGINS_WITH_VALUE = 2; + /** + * + * + *
+       * Ends with the string value.
+       * 
+ * + * ENDS_WITH = 3; + */ + public static final int ENDS_WITH_VALUE = 3; + /** + * + * + *
+       * Contains the string value.
+       * 
+ * + * CONTAINS = 4; + */ + public static final int CONTAINS_VALUE = 4; + /** + * + * + *
+       * Full regular expression match with the string value.
+       * 
+ * + * FULL_REGEXP = 5; + */ + public static final int FULL_REGEXP_VALUE = 5; + /** + * + * + *
+       * Partial regular expression match with the string value.
+       * 
+ * + * PARTIAL_REGEXP = 6; + */ + public static final int PARTIAL_REGEXP_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MatchType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MatchType forNumber(int value) { + switch (value) { + case 0: + return MATCH_TYPE_UNSPECIFIED; + case 1: + return EXACT; + case 2: + return BEGINS_WITH; + case 3: + return ENDS_WITH; + case 4: + return CONTAINS; + case 5: + return FULL_REGEXP; + case 6: + return PARTIAL_REGEXP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MatchType findValueByNumber(int number) { + return MatchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.Filter.StringFilter.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MatchType[] VALUES = values(); + + public static MatchType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MatchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.Filter.StringFilter.MatchType) + } + + public static final int MATCH_TYPE_FIELD_NUMBER = 1; + private int matchType_; + /** + * + * + *
+     * The match type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + /** + * + * + *
+     * The match type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The matchType. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter.MatchType getMatchType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType result = + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.valueOf(matchType_); + return result == null + ? com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.UNRECOGNIZED + : result; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object value_; + /** + * + * + *
+     * The string value used for the matching.
+     * 
+ * + * string value = 2; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * The string value used for the matching.
+     * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CASE_SENSITIVE_FIELD_NUMBER = 3; + private boolean caseSensitive_; + /** + * + * + *
+     * If true, the string value is case sensitive.
+     * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (matchType_ + != com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.MATCH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, matchType_); + } + if (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); + } + if (caseSensitive_ != false) { + output.writeBool(3, caseSensitive_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (matchType_ + != com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.MATCH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, matchType_); + } + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); + } + if (caseSensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, caseSensitive_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Filter.StringFilter)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Filter.StringFilter other = + (com.google.analytics.data.v1beta.Filter.StringFilter) obj; + + if (matchType_ != other.matchType_) return false; + if (!getValue().equals(other.getValue())) return false; + if (getCaseSensitive() != other.getCaseSensitive()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MATCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + matchType_; + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + CASE_SENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseSensitive()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.Filter.StringFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The filter for string
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.StringFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Filter.StringFilter) + com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_StringFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.StringFilter.class, + com.google.analytics.data.v1beta.Filter.StringFilter.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Filter.StringFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + matchType_ = 0; + + value_ = ""; + + caseSensitive_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter build() { + com.google.analytics.data.v1beta.Filter.StringFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter buildPartial() { + com.google.analytics.data.v1beta.Filter.StringFilter result = + new com.google.analytics.data.v1beta.Filter.StringFilter(this); + result.matchType_ = matchType_; + result.value_ = value_; + result.caseSensitive_ = caseSensitive_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Filter.StringFilter) { + return mergeFrom((com.google.analytics.data.v1beta.Filter.StringFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Filter.StringFilter other) { + if (other == com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance()) + return this; + if (other.matchType_ != 0) { + setMatchTypeValue(other.getMatchTypeValue()); + } + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (other.getCaseSensitive() != false) { + setCaseSensitive(other.getCaseSensitive()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Filter.StringFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.Filter.StringFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int matchType_ = 0; + /** + * + * + *
+       * The match type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + /** + * + * + *
+       * The match type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @param value The enum numeric value on the wire for matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchTypeValue(int value) { + + matchType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The match type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return The matchType. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter.MatchType getMatchType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType result = + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.valueOf(matchType_); + return result == null + ? com.google.analytics.data.v1beta.Filter.StringFilter.MatchType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The match type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @param value The matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchType( + com.google.analytics.data.v1beta.Filter.StringFilter.MatchType value) { + if (value == null) { + throw new NullPointerException(); + } + + matchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The match type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter.MatchType match_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearMatchType() { + + matchType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * The string value used for the matching.
+       * 
+ * + * string value = 2; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The string value used for the matching.
+       * 
+ * + * string value = 2; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The string value used for the matching.
+       * 
+ * + * string value = 2; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The string value used for the matching.
+       * 
+ * + * string value = 2; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * The string value used for the matching.
+       * 
+ * + * string value = 2; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private boolean caseSensitive_; + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @param value The caseSensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseSensitive(boolean value) { + + caseSensitive_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 3; + * + * @return This builder for chaining. + */ + public Builder clearCaseSensitive() { + + caseSensitive_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Filter.StringFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Filter.StringFilter) + private static final com.google.analytics.data.v1beta.Filter.StringFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Filter.StringFilter(); + } + + public static com.google.analytics.data.v1beta.Filter.StringFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StringFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StringFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InListFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Filter.InListFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + java.util.List getValuesList(); + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + int getValuesCount(); + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + java.lang.String getValues(int index); + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + com.google.protobuf.ByteString getValuesBytes(int index); + + /** + * + * + *
+     * If true, the string value is case sensitive.
+     * 
+ * + * bool case_sensitive = 2; + * + * @return The caseSensitive. + */ + boolean getCaseSensitive(); + } + /** + * + * + *
+   * The result needs to be in a list of string values.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.InListFilter} + */ + public static final class InListFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Filter.InListFilter) + InListFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use InListFilter.newBuilder() to construct. + private InListFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InListFilter() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new InListFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InListFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add(s); + break; + } + case 16: + { + caseSensitive_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_InListFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.InListFilter.class, + com.google.analytics.data.v1beta.Filter.InListFilter.Builder.class); + } + + public static final int VALUES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList values_; + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_; + } + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+     * The list of string values.
+     * Must be non-empty.
+     * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + + public static final int CASE_SENSITIVE_FIELD_NUMBER = 2; + private boolean caseSensitive_; + /** + * + * + *
+     * If true, the string value is case sensitive.
+     * 
+ * + * bool case_sensitive = 2; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < values_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i)); + } + if (caseSensitive_ != false) { + output.writeBool(2, caseSensitive_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < values_.size(); i++) { + dataSize += computeStringSizeNoTag(values_.getRaw(i)); + } + size += dataSize; + size += 1 * getValuesList().size(); + } + if (caseSensitive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, caseSensitive_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Filter.InListFilter)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Filter.InListFilter other = + (com.google.analytics.data.v1beta.Filter.InListFilter) obj; + + if (!getValuesList().equals(other.getValuesList())) return false; + if (getCaseSensitive() != other.getCaseSensitive()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (37 * hash) + CASE_SENSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCaseSensitive()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.Filter.InListFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The result needs to be in a list of string values.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.InListFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Filter.InListFilter) + com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_InListFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.InListFilter.class, + com.google.analytics.data.v1beta.Filter.InListFilter.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Filter.InListFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + caseSensitive_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter build() { + com.google.analytics.data.v1beta.Filter.InListFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter buildPartial() { + com.google.analytics.data.v1beta.Filter.InListFilter result = + new com.google.analytics.data.v1beta.Filter.InListFilter(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + values_ = values_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + result.caseSensitive_ = caseSensitive_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Filter.InListFilter) { + return mergeFrom((com.google.analytics.data.v1beta.Filter.InListFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Filter.InListFilter other) { + if (other == com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance()) + return this; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + if (other.getCaseSensitive() != false) { + setCaseSensitive(other.getCaseSensitive()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Filter.InListFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.Filter.InListFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList values_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new com.google.protobuf.LazyStringArrayList(values_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @return A list containing the values. + */ + public com.google.protobuf.ProtocolStringList getValuesList() { + return values_.getUnmodifiableView(); + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @return The count of values. + */ + public int getValuesCount() { + return values_.size(); + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the element to return. + * @return The values at the given index. + */ + public java.lang.String getValues(int index) { + return values_.get(index); + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index of the value to return. + * @return The bytes of the values at the given index. + */ + public com.google.protobuf.ByteString getValuesBytes(int index) { + return values_.getByteString(index); + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param index The index to set the value at. + * @param value The values to set. + * @return This builder for chaining. + */ + public Builder setValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param value The values to add. + * @return This builder for chaining. + */ + public Builder addValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param values The values to add. + * @return This builder for chaining. + */ + public Builder addAllValues(java.lang.Iterable values) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @return This builder for chaining. + */ + public Builder clearValues() { + values_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The list of string values.
+       * Must be non-empty.
+       * 
+ * + * repeated string values = 1; + * + * @param value The bytes of the values to add. + * @return This builder for chaining. + */ + public Builder addValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + return this; + } + + private boolean caseSensitive_; + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 2; + * + * @return The caseSensitive. + */ + @java.lang.Override + public boolean getCaseSensitive() { + return caseSensitive_; + } + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 2; + * + * @param value The caseSensitive to set. + * @return This builder for chaining. + */ + public Builder setCaseSensitive(boolean value) { + + caseSensitive_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the string value is case sensitive.
+       * 
+ * + * bool case_sensitive = 2; + * + * @return This builder for chaining. + */ + public Builder clearCaseSensitive() { + + caseSensitive_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Filter.InListFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Filter.InListFilter) + private static final com.google.analytics.data.v1beta.Filter.InListFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Filter.InListFilter(); + } + + public static com.google.analytics.data.v1beta.Filter.InListFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InListFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InListFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NumericFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Filter.NumericFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The operation type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The enum numeric value on the wire for operation. + */ + int getOperationValue(); + /** + * + * + *
+     * The operation type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The operation. + */ + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation getOperation(); + + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return The value. + */ + com.google.analytics.data.v1beta.NumericValue getValue(); + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + com.google.analytics.data.v1beta.NumericValueOrBuilder getValueOrBuilder(); + } + /** + * + * + *
+   * Filters for numeric or date values.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.NumericFilter} + */ + public static final class NumericFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Filter.NumericFilter) + NumericFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericFilter.newBuilder() to construct. + private NumericFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericFilter() { + operation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + operation_ = rawValue; + break; + } + case 18: + { + com.google.analytics.data.v1beta.NumericValue.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = + input.readMessage( + com.google.analytics.data.v1beta.NumericValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_NumericFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.NumericFilter.class, + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder.class); + } + + /** + * + * + *
+     * The operation applied to a numeric filter
+     * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.Filter.NumericFilter.Operation} + */ + public enum Operation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * OPERATION_UNSPECIFIED = 0; + */ + OPERATION_UNSPECIFIED(0), + /** + * + * + *
+       * Equal
+       * 
+ * + * EQUAL = 1; + */ + EQUAL(1), + /** + * + * + *
+       * Less than
+       * 
+ * + * LESS_THAN = 2; + */ + LESS_THAN(2), + /** + * + * + *
+       * Less than or equal
+       * 
+ * + * LESS_THAN_OR_EQUAL = 3; + */ + LESS_THAN_OR_EQUAL(3), + /** + * + * + *
+       * Greater than
+       * 
+ * + * GREATER_THAN = 4; + */ + GREATER_THAN(4), + /** + * + * + *
+       * Greater than or equal
+       * 
+ * + * GREATER_THAN_OR_EQUAL = 5; + */ + GREATER_THAN_OR_EQUAL(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * OPERATION_UNSPECIFIED = 0; + */ + public static final int OPERATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Equal
+       * 
+ * + * EQUAL = 1; + */ + public static final int EQUAL_VALUE = 1; + /** + * + * + *
+       * Less than
+       * 
+ * + * LESS_THAN = 2; + */ + public static final int LESS_THAN_VALUE = 2; + /** + * + * + *
+       * Less than or equal
+       * 
+ * + * LESS_THAN_OR_EQUAL = 3; + */ + public static final int LESS_THAN_OR_EQUAL_VALUE = 3; + /** + * + * + *
+       * Greater than
+       * 
+ * + * GREATER_THAN = 4; + */ + public static final int GREATER_THAN_VALUE = 4; + /** + * + * + *
+       * Greater than or equal
+       * 
+ * + * GREATER_THAN_OR_EQUAL = 5; + */ + public static final int GREATER_THAN_OR_EQUAL_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Operation valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Operation forNumber(int value) { + switch (value) { + case 0: + return OPERATION_UNSPECIFIED; + case 1: + return EQUAL; + case 2: + return LESS_THAN; + case 3: + return LESS_THAN_OR_EQUAL; + case 4: + return GREATER_THAN; + case 5: + return GREATER_THAN_OR_EQUAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Operation findValueByNumber(int number) { + return Operation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Operation[] VALUES = values(); + + public static Operation valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Operation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.Filter.NumericFilter.Operation) + } + + public static final int OPERATION_FIELD_NUMBER = 1; + private int operation_; + /** + * + * + *
+     * The operation type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override + public int getOperationValue() { + return operation_; + } + /** + * + * + *
+     * The operation type for this filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The operation. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter.Operation getOperation() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation result = + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.valueOf(operation_); + return result == null + ? com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.UNRECOGNIZED + : result; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.analytics.data.v1beta.NumericValue value_; + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue getValue() { + return value_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : value_; + } + /** + * + * + *
+     * A numeric value or a date value.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (operation_ + != com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.OPERATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, operation_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (operation_ + != com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.OPERATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, operation_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Filter.NumericFilter)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Filter.NumericFilter other = + (com.google.analytics.data.v1beta.Filter.NumericFilter) obj; + + if (operation_ != other.operation_) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATION_FIELD_NUMBER; + hash = (53 * hash) + operation_; + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.Filter.NumericFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Filters for numeric or date values.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.NumericFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Filter.NumericFilter) + com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_NumericFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.NumericFilter.class, + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Filter.NumericFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + operation_ = 0; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter build() { + com.google.analytics.data.v1beta.Filter.NumericFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter buildPartial() { + com.google.analytics.data.v1beta.Filter.NumericFilter result = + new com.google.analytics.data.v1beta.Filter.NumericFilter(this); + result.operation_ = operation_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Filter.NumericFilter) { + return mergeFrom((com.google.analytics.data.v1beta.Filter.NumericFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Filter.NumericFilter other) { + if (other == com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance()) + return this; + if (other.operation_ != 0) { + setOperationValue(other.getOperationValue()); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Filter.NumericFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.Filter.NumericFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int operation_ = 0; + /** + * + * + *
+       * The operation type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The enum numeric value on the wire for operation. + */ + @java.lang.Override + public int getOperationValue() { + return operation_; + } + /** + * + * + *
+       * The operation type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @param value The enum numeric value on the wire for operation to set. + * @return This builder for chaining. + */ + public Builder setOperationValue(int value) { + + operation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The operation type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return The operation. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter.Operation getOperation() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation result = + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.valueOf(operation_); + return result == null + ? com.google.analytics.data.v1beta.Filter.NumericFilter.Operation.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The operation type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @param value The operation to set. + * @return This builder for chaining. + */ + public Builder setOperation( + com.google.analytics.data.v1beta.Filter.NumericFilter.Operation value) { + if (value == null) { + throw new NullPointerException(); + } + + operation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The operation type for this filter.
+       * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter.Operation operation = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperation() { + + operation_ = 0; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.NumericValue value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + valueBuilder_; + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + * + * @return The value. + */ + public com.google.analytics.data.v1beta.NumericValue getValue() { + if (valueBuilder_ == null) { + return value_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public Builder setValue(com.google.analytics.data.v1beta.NumericValue value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public Builder setValue( + com.google.analytics.data.v1beta.NumericValue.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public Builder mergeValue(com.google.analytics.data.v1beta.NumericValue value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.analytics.data.v1beta.NumericValue.newBuilder(value_) + .mergeFrom(value) + .buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public com.google.analytics.data.v1beta.NumericValue.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + public com.google.analytics.data.v1beta.NumericValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : value_; + } + } + /** + * + * + *
+       * A numeric value or a date value.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder>( + getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Filter.NumericFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Filter.NumericFilter) + private static final com.google.analytics.data.v1beta.Filter.NumericFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Filter.NumericFilter(); + } + + public static com.google.analytics.data.v1beta.Filter.NumericFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BetweenFilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Filter.BetweenFilter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return Whether the fromValue field is set. + */ + boolean hasFromValue(); + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return The fromValue. + */ + com.google.analytics.data.v1beta.NumericValue getFromValue(); + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + com.google.analytics.data.v1beta.NumericValueOrBuilder getFromValueOrBuilder(); + + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return Whether the toValue field is set. + */ + boolean hasToValue(); + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return The toValue. + */ + com.google.analytics.data.v1beta.NumericValue getToValue(); + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + com.google.analytics.data.v1beta.NumericValueOrBuilder getToValueOrBuilder(); + } + /** + * + * + *
+   * To express that the result needs to be between two numbers (inclusive).
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.BetweenFilter} + */ + public static final class BetweenFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Filter.BetweenFilter) + BetweenFilterOrBuilder { + private static final long serialVersionUID = 0L; + // Use BetweenFilter.newBuilder() to construct. + private BetweenFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BetweenFilter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BetweenFilter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BetweenFilter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1beta.NumericValue.Builder subBuilder = null; + if (fromValue_ != null) { + subBuilder = fromValue_.toBuilder(); + } + fromValue_ = + input.readMessage( + com.google.analytics.data.v1beta.NumericValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(fromValue_); + fromValue_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.analytics.data.v1beta.NumericValue.Builder subBuilder = null; + if (toValue_ != null) { + subBuilder = toValue_.toBuilder(); + } + toValue_ = + input.readMessage( + com.google.analytics.data.v1beta.NumericValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(toValue_); + toValue_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.BetweenFilter.class, + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder.class); + } + + public static final int FROM_VALUE_FIELD_NUMBER = 1; + private com.google.analytics.data.v1beta.NumericValue fromValue_; + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return Whether the fromValue field is set. + */ + @java.lang.Override + public boolean hasFromValue() { + return fromValue_ != null; + } + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return The fromValue. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue getFromValue() { + return fromValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : fromValue_; + } + /** + * + * + *
+     * Begins with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValueOrBuilder getFromValueOrBuilder() { + return getFromValue(); + } + + public static final int TO_VALUE_FIELD_NUMBER = 2; + private com.google.analytics.data.v1beta.NumericValue toValue_; + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return Whether the toValue field is set. + */ + @java.lang.Override + public boolean hasToValue() { + return toValue_ != null; + } + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return The toValue. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue getToValue() { + return toValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : toValue_; + } + /** + * + * + *
+     * Ends with this number.
+     * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValueOrBuilder getToValueOrBuilder() { + return getToValue(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (fromValue_ != null) { + output.writeMessage(1, getFromValue()); + } + if (toValue_ != null) { + output.writeMessage(2, getToValue()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (fromValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFromValue()); + } + if (toValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getToValue()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Filter.BetweenFilter)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Filter.BetweenFilter other = + (com.google.analytics.data.v1beta.Filter.BetweenFilter) obj; + + if (hasFromValue() != other.hasFromValue()) return false; + if (hasFromValue()) { + if (!getFromValue().equals(other.getFromValue())) return false; + } + if (hasToValue() != other.hasToValue()) return false; + if (hasToValue()) { + if (!getToValue().equals(other.getToValue())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasFromValue()) { + hash = (37 * hash) + FROM_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getFromValue().hashCode(); + } + if (hasToValue()) { + hash = (37 * hash) + TO_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getToValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.Filter.BetweenFilter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * To express that the result needs to be between two numbers (inclusive).
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter.BetweenFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Filter.BetweenFilter) + com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.BetweenFilter.class, + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Filter.BetweenFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (fromValueBuilder_ == null) { + fromValue_ = null; + } else { + fromValue_ = null; + fromValueBuilder_ = null; + } + if (toValueBuilder_ == null) { + toValue_ = null; + } else { + toValue_ = null; + toValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter build() { + com.google.analytics.data.v1beta.Filter.BetweenFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter buildPartial() { + com.google.analytics.data.v1beta.Filter.BetweenFilter result = + new com.google.analytics.data.v1beta.Filter.BetweenFilter(this); + if (fromValueBuilder_ == null) { + result.fromValue_ = fromValue_; + } else { + result.fromValue_ = fromValueBuilder_.build(); + } + if (toValueBuilder_ == null) { + result.toValue_ = toValue_; + } else { + result.toValue_ = toValueBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Filter.BetweenFilter) { + return mergeFrom((com.google.analytics.data.v1beta.Filter.BetweenFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Filter.BetweenFilter other) { + if (other == com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance()) + return this; + if (other.hasFromValue()) { + mergeFromValue(other.getFromValue()); + } + if (other.hasToValue()) { + mergeToValue(other.getToValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Filter.BetweenFilter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.Filter.BetweenFilter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.data.v1beta.NumericValue fromValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + fromValueBuilder_; + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return Whether the fromValue field is set. + */ + public boolean hasFromValue() { + return fromValueBuilder_ != null || fromValue_ != null; + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + * + * @return The fromValue. + */ + public com.google.analytics.data.v1beta.NumericValue getFromValue() { + if (fromValueBuilder_ == null) { + return fromValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : fromValue_; + } else { + return fromValueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public Builder setFromValue(com.google.analytics.data.v1beta.NumericValue value) { + if (fromValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fromValue_ = value; + onChanged(); + } else { + fromValueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public Builder setFromValue( + com.google.analytics.data.v1beta.NumericValue.Builder builderForValue) { + if (fromValueBuilder_ == null) { + fromValue_ = builderForValue.build(); + onChanged(); + } else { + fromValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public Builder mergeFromValue(com.google.analytics.data.v1beta.NumericValue value) { + if (fromValueBuilder_ == null) { + if (fromValue_ != null) { + fromValue_ = + com.google.analytics.data.v1beta.NumericValue.newBuilder(fromValue_) + .mergeFrom(value) + .buildPartial(); + } else { + fromValue_ = value; + } + onChanged(); + } else { + fromValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public Builder clearFromValue() { + if (fromValueBuilder_ == null) { + fromValue_ = null; + onChanged(); + } else { + fromValue_ = null; + fromValueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public com.google.analytics.data.v1beta.NumericValue.Builder getFromValueBuilder() { + + onChanged(); + return getFromValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + public com.google.analytics.data.v1beta.NumericValueOrBuilder getFromValueOrBuilder() { + if (fromValueBuilder_ != null) { + return fromValueBuilder_.getMessageOrBuilder(); + } else { + return fromValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : fromValue_; + } + } + /** + * + * + *
+       * Begins with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue from_value = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + getFromValueFieldBuilder() { + if (fromValueBuilder_ == null) { + fromValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder>( + getFromValue(), getParentForChildren(), isClean()); + fromValue_ = null; + } + return fromValueBuilder_; + } + + private com.google.analytics.data.v1beta.NumericValue toValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + toValueBuilder_; + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return Whether the toValue field is set. + */ + public boolean hasToValue() { + return toValueBuilder_ != null || toValue_ != null; + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + * + * @return The toValue. + */ + public com.google.analytics.data.v1beta.NumericValue getToValue() { + if (toValueBuilder_ == null) { + return toValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : toValue_; + } else { + return toValueBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public Builder setToValue(com.google.analytics.data.v1beta.NumericValue value) { + if (toValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toValue_ = value; + onChanged(); + } else { + toValueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public Builder setToValue( + com.google.analytics.data.v1beta.NumericValue.Builder builderForValue) { + if (toValueBuilder_ == null) { + toValue_ = builderForValue.build(); + onChanged(); + } else { + toValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public Builder mergeToValue(com.google.analytics.data.v1beta.NumericValue value) { + if (toValueBuilder_ == null) { + if (toValue_ != null) { + toValue_ = + com.google.analytics.data.v1beta.NumericValue.newBuilder(toValue_) + .mergeFrom(value) + .buildPartial(); + } else { + toValue_ = value; + } + onChanged(); + } else { + toValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public Builder clearToValue() { + if (toValueBuilder_ == null) { + toValue_ = null; + onChanged(); + } else { + toValue_ = null; + toValueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public com.google.analytics.data.v1beta.NumericValue.Builder getToValueBuilder() { + + onChanged(); + return getToValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + public com.google.analytics.data.v1beta.NumericValueOrBuilder getToValueOrBuilder() { + if (toValueBuilder_ != null) { + return toValueBuilder_.getMessageOrBuilder(); + } else { + return toValue_ == null + ? com.google.analytics.data.v1beta.NumericValue.getDefaultInstance() + : toValue_; + } + } + /** + * + * + *
+       * Ends with this number.
+       * 
+ * + * .google.analytics.data.v1beta.NumericValue to_value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder> + getToValueFieldBuilder() { + if (toValueBuilder_ == null) { + toValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.NumericValue, + com.google.analytics.data.v1beta.NumericValue.Builder, + com.google.analytics.data.v1beta.NumericValueOrBuilder>( + getToValue(), getParentForChildren(), isClean()); + toValue_ = null; + } + return toValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Filter.BetweenFilter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Filter.BetweenFilter) + private static final com.google.analytics.data.v1beta.Filter.BetweenFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Filter.BetweenFilter(); + } + + public static com.google.analytics.data.v1beta.Filter.BetweenFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BetweenFilter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BetweenFilter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int oneFilterCase_ = 0; + private java.lang.Object oneFilter_; + + public enum OneFilterCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STRING_FILTER(3), + IN_LIST_FILTER(4), + NUMERIC_FILTER(5), + BETWEEN_FILTER(6), + ONEFILTER_NOT_SET(0); + private final int value; + + private OneFilterCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneFilterCase valueOf(int value) { + return forNumber(value); + } + + public static OneFilterCase forNumber(int value) { + switch (value) { + case 3: + return STRING_FILTER; + case 4: + return IN_LIST_FILTER; + case 5: + return NUMERIC_FILTER; + case 6: + return BETWEEN_FILTER; + case 0: + return ONEFILTER_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneFilterCase getOneFilterCase() { + return OneFilterCase.forNumber(oneFilterCase_); + } + + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fieldName_; + /** + * + * + *
+   * The dimension name or metric name. Must be a name defined in dimensions
+   * or metrics.
+   * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } + } + /** + * + * + *
+   * The dimension name or metric name. Must be a name defined in dimensions
+   * or metrics.
+   * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STRING_FILTER_FIELD_NUMBER = 3; + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return Whether the stringFilter field is set. + */ + @java.lang.Override + public boolean hasStringFilter() { + return oneFilterCase_ == 3; + } + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return The stringFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter getStringFilter() { + if (oneFilterCase_ == 3) { + return (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder getStringFilterOrBuilder() { + if (oneFilterCase_ == 3) { + return (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + + public static final int IN_LIST_FILTER_FIELD_NUMBER = 4; + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return Whether the inListFilter field is set. + */ + @java.lang.Override + public boolean hasInListFilter() { + return oneFilterCase_ == 4; + } + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return The inListFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter getInListFilter() { + if (oneFilterCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder getInListFilterOrBuilder() { + if (oneFilterCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + + public static final int NUMERIC_FILTER_FIELD_NUMBER = 5; + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return Whether the numericFilter field is set. + */ + @java.lang.Override + public boolean hasNumericFilter() { + return oneFilterCase_ == 5; + } + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return The numericFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter getNumericFilter() { + if (oneFilterCase_ == 5) { + return (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder + getNumericFilterOrBuilder() { + if (oneFilterCase_ == 5) { + return (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + + public static final int BETWEEN_FILTER_FIELD_NUMBER = 6; + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return Whether the betweenFilter field is set. + */ + @java.lang.Override + public boolean hasBetweenFilter() { + return oneFilterCase_ == 6; + } + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return The betweenFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter getBetweenFilter() { + if (oneFilterCase_ == 6) { + return (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder + getBetweenFilterOrBuilder() { + if (oneFilterCase_ == 6) { + return (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getFieldNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_); + } + if (oneFilterCase_ == 3) { + output.writeMessage(3, (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_); + } + if (oneFilterCase_ == 4) { + output.writeMessage(4, (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_); + } + if (oneFilterCase_ == 5) { + output.writeMessage(5, (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_); + } + if (oneFilterCase_ == 6) { + output.writeMessage(6, (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFieldNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_); + } + if (oneFilterCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_); + } + if (oneFilterCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_); + } + if (oneFilterCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_); + } + if (oneFilterCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Filter)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Filter other = (com.google.analytics.data.v1beta.Filter) obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (!getOneFilterCase().equals(other.getOneFilterCase())) return false; + switch (oneFilterCase_) { + case 3: + if (!getStringFilter().equals(other.getStringFilter())) return false; + break; + case 4: + if (!getInListFilter().equals(other.getInListFilter())) return false; + break; + case 5: + if (!getNumericFilter().equals(other.getNumericFilter())) return false; + break; + case 6: + if (!getBetweenFilter().equals(other.getBetweenFilter())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + switch (oneFilterCase_) { + case 3: + hash = (37 * hash) + STRING_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getStringFilter().hashCode(); + break; + case 4: + hash = (37 * hash) + IN_LIST_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getInListFilter().hashCode(); + break; + case 5: + hash = (37 * hash) + NUMERIC_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getNumericFilter().hashCode(); + break; + case 6: + hash = (37 * hash) + BETWEEN_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getBetweenFilter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Filter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Filter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Filter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An expression to filter dimension or metric values.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Filter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Filter) + com.google.analytics.data.v1beta.FilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Filter.class, + com.google.analytics.data.v1beta.Filter.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Filter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + fieldName_ = ""; + + oneFilterCase_ = 0; + oneFilter_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Filter_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter build() { + com.google.analytics.data.v1beta.Filter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter buildPartial() { + com.google.analytics.data.v1beta.Filter result = + new com.google.analytics.data.v1beta.Filter(this); + result.fieldName_ = fieldName_; + if (oneFilterCase_ == 3) { + if (stringFilterBuilder_ == null) { + result.oneFilter_ = oneFilter_; + } else { + result.oneFilter_ = stringFilterBuilder_.build(); + } + } + if (oneFilterCase_ == 4) { + if (inListFilterBuilder_ == null) { + result.oneFilter_ = oneFilter_; + } else { + result.oneFilter_ = inListFilterBuilder_.build(); + } + } + if (oneFilterCase_ == 5) { + if (numericFilterBuilder_ == null) { + result.oneFilter_ = oneFilter_; + } else { + result.oneFilter_ = numericFilterBuilder_.build(); + } + } + if (oneFilterCase_ == 6) { + if (betweenFilterBuilder_ == null) { + result.oneFilter_ = oneFilter_; + } else { + result.oneFilter_ = betweenFilterBuilder_.build(); + } + } + result.oneFilterCase_ = oneFilterCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Filter) { + return mergeFrom((com.google.analytics.data.v1beta.Filter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Filter other) { + if (other == com.google.analytics.data.v1beta.Filter.getDefaultInstance()) return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + onChanged(); + } + switch (other.getOneFilterCase()) { + case STRING_FILTER: + { + mergeStringFilter(other.getStringFilter()); + break; + } + case IN_LIST_FILTER: + { + mergeInListFilter(other.getInListFilter()); + break; + } + case NUMERIC_FILTER: + { + mergeNumericFilter(other.getNumericFilter()); + break; + } + case BETWEEN_FILTER: + { + mergeBetweenFilter(other.getBetweenFilter()); + break; + } + case ONEFILTER_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Filter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Filter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneFilterCase_ = 0; + private java.lang.Object oneFilter_; + + public OneFilterCase getOneFilterCase() { + return OneFilterCase.forNumber(oneFilterCase_); + } + + public Builder clearOneFilter() { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + return this; + } + + private java.lang.Object fieldName_ = ""; + /** + * + * + *
+     * The dimension name or metric name. Must be a name defined in dimensions
+     * or metrics.
+     * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The dimension name or metric name. Must be a name defined in dimensions
+     * or metrics.
+     * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The dimension name or metric name. Must be a name defined in dimensions
+     * or metrics.
+     * 
+ * + * string field_name = 1; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fieldName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension name or metric name. Must be a name defined in dimensions
+     * or metrics.
+     * 
+ * + * string field_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension name or metric name. Must be a name defined in dimensions
+     * or metrics.
+     * 
+ * + * string field_name = 1; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fieldName_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.StringFilter, + com.google.analytics.data.v1beta.Filter.StringFilter.Builder, + com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder> + stringFilterBuilder_; + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return Whether the stringFilter field is set. + */ + @java.lang.Override + public boolean hasStringFilter() { + return oneFilterCase_ == 3; + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return The stringFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilter getStringFilter() { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3) { + return (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } else { + if (oneFilterCase_ == 3) { + return stringFilterBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + public Builder setStringFilter(com.google.analytics.data.v1beta.Filter.StringFilter value) { + if (stringFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneFilter_ = value; + onChanged(); + } else { + stringFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + public Builder setStringFilter( + com.google.analytics.data.v1beta.Filter.StringFilter.Builder builderForValue) { + if (stringFilterBuilder_ == null) { + oneFilter_ = builderForValue.build(); + onChanged(); + } else { + stringFilterBuilder_.setMessage(builderForValue.build()); + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + public Builder mergeStringFilter(com.google.analytics.data.v1beta.Filter.StringFilter value) { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3 + && oneFilter_ + != com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance()) { + oneFilter_ = + com.google.analytics.data.v1beta.Filter.StringFilter.newBuilder( + (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + oneFilter_ = value; + } + onChanged(); + } else { + if (oneFilterCase_ == 3) { + stringFilterBuilder_.mergeFrom(value); + } + stringFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 3; + return this; + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + public Builder clearStringFilter() { + if (stringFilterBuilder_ == null) { + if (oneFilterCase_ == 3) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + } else { + if (oneFilterCase_ == 3) { + oneFilterCase_ = 0; + oneFilter_ = null; + } + stringFilterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + public com.google.analytics.data.v1beta.Filter.StringFilter.Builder getStringFilterBuilder() { + return getStringFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder + getStringFilterOrBuilder() { + if ((oneFilterCase_ == 3) && (stringFilterBuilder_ != null)) { + return stringFilterBuilder_.getMessageOrBuilder(); + } else { + if (oneFilterCase_ == 3) { + return (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * Strings related filter.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.StringFilter, + com.google.analytics.data.v1beta.Filter.StringFilter.Builder, + com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder> + getStringFilterFieldBuilder() { + if (stringFilterBuilder_ == null) { + if (!(oneFilterCase_ == 3)) { + oneFilter_ = com.google.analytics.data.v1beta.Filter.StringFilter.getDefaultInstance(); + } + stringFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.StringFilter, + com.google.analytics.data.v1beta.Filter.StringFilter.Builder, + com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder>( + (com.google.analytics.data.v1beta.Filter.StringFilter) oneFilter_, + getParentForChildren(), + isClean()); + oneFilter_ = null; + } + oneFilterCase_ = 3; + onChanged(); + ; + return stringFilterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.InListFilter, + com.google.analytics.data.v1beta.Filter.InListFilter.Builder, + com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder> + inListFilterBuilder_; + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return Whether the inListFilter field is set. + */ + @java.lang.Override + public boolean hasInListFilter() { + return oneFilterCase_ == 4; + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return The inListFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilter getInListFilter() { + if (inListFilterBuilder_ == null) { + if (oneFilterCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } else { + if (oneFilterCase_ == 4) { + return inListFilterBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + public Builder setInListFilter(com.google.analytics.data.v1beta.Filter.InListFilter value) { + if (inListFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneFilter_ = value; + onChanged(); + } else { + inListFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 4; + return this; + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + public Builder setInListFilter( + com.google.analytics.data.v1beta.Filter.InListFilter.Builder builderForValue) { + if (inListFilterBuilder_ == null) { + oneFilter_ = builderForValue.build(); + onChanged(); + } else { + inListFilterBuilder_.setMessage(builderForValue.build()); + } + oneFilterCase_ = 4; + return this; + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + public Builder mergeInListFilter(com.google.analytics.data.v1beta.Filter.InListFilter value) { + if (inListFilterBuilder_ == null) { + if (oneFilterCase_ == 4 + && oneFilter_ + != com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance()) { + oneFilter_ = + com.google.analytics.data.v1beta.Filter.InListFilter.newBuilder( + (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + oneFilter_ = value; + } + onChanged(); + } else { + if (oneFilterCase_ == 4) { + inListFilterBuilder_.mergeFrom(value); + } + inListFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 4; + return this; + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + public Builder clearInListFilter() { + if (inListFilterBuilder_ == null) { + if (oneFilterCase_ == 4) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + } else { + if (oneFilterCase_ == 4) { + oneFilterCase_ = 0; + oneFilter_ = null; + } + inListFilterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + public com.google.analytics.data.v1beta.Filter.InListFilter.Builder getInListFilterBuilder() { + return getInListFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder + getInListFilterOrBuilder() { + if ((oneFilterCase_ == 4) && (inListFilterBuilder_ != null)) { + return inListFilterBuilder_.getMessageOrBuilder(); + } else { + if (oneFilterCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for in list values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.InListFilter, + com.google.analytics.data.v1beta.Filter.InListFilter.Builder, + com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder> + getInListFilterFieldBuilder() { + if (inListFilterBuilder_ == null) { + if (!(oneFilterCase_ == 4)) { + oneFilter_ = com.google.analytics.data.v1beta.Filter.InListFilter.getDefaultInstance(); + } + inListFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.InListFilter, + com.google.analytics.data.v1beta.Filter.InListFilter.Builder, + com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder>( + (com.google.analytics.data.v1beta.Filter.InListFilter) oneFilter_, + getParentForChildren(), + isClean()); + oneFilter_ = null; + } + oneFilterCase_ = 4; + onChanged(); + ; + return inListFilterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.NumericFilter, + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder, + com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder> + numericFilterBuilder_; + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return Whether the numericFilter field is set. + */ + @java.lang.Override + public boolean hasNumericFilter() { + return oneFilterCase_ == 5; + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return The numericFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilter getNumericFilter() { + if (numericFilterBuilder_ == null) { + if (oneFilterCase_ == 5) { + return (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } else { + if (oneFilterCase_ == 5) { + return numericFilterBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + public Builder setNumericFilter(com.google.analytics.data.v1beta.Filter.NumericFilter value) { + if (numericFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneFilter_ = value; + onChanged(); + } else { + numericFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 5; + return this; + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + public Builder setNumericFilter( + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder builderForValue) { + if (numericFilterBuilder_ == null) { + oneFilter_ = builderForValue.build(); + onChanged(); + } else { + numericFilterBuilder_.setMessage(builderForValue.build()); + } + oneFilterCase_ = 5; + return this; + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + public Builder mergeNumericFilter(com.google.analytics.data.v1beta.Filter.NumericFilter value) { + if (numericFilterBuilder_ == null) { + if (oneFilterCase_ == 5 + && oneFilter_ + != com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance()) { + oneFilter_ = + com.google.analytics.data.v1beta.Filter.NumericFilter.newBuilder( + (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + oneFilter_ = value; + } + onChanged(); + } else { + if (oneFilterCase_ == 5) { + numericFilterBuilder_.mergeFrom(value); + } + numericFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 5; + return this; + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + public Builder clearNumericFilter() { + if (numericFilterBuilder_ == null) { + if (oneFilterCase_ == 5) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + } else { + if (oneFilterCase_ == 5) { + oneFilterCase_ = 0; + oneFilter_ = null; + } + numericFilterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + public com.google.analytics.data.v1beta.Filter.NumericFilter.Builder getNumericFilterBuilder() { + return getNumericFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder + getNumericFilterOrBuilder() { + if ((oneFilterCase_ == 5) && (numericFilterBuilder_ != null)) { + return numericFilterBuilder_.getMessageOrBuilder(); + } else { + if (oneFilterCase_ == 5) { + return (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for numeric or date values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.NumericFilter, + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder, + com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder> + getNumericFilterFieldBuilder() { + if (numericFilterBuilder_ == null) { + if (!(oneFilterCase_ == 5)) { + oneFilter_ = com.google.analytics.data.v1beta.Filter.NumericFilter.getDefaultInstance(); + } + numericFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.NumericFilter, + com.google.analytics.data.v1beta.Filter.NumericFilter.Builder, + com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder>( + (com.google.analytics.data.v1beta.Filter.NumericFilter) oneFilter_, + getParentForChildren(), + isClean()); + oneFilter_ = null; + } + oneFilterCase_ = 5; + onChanged(); + ; + return numericFilterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.BetweenFilter, + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder, + com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder> + betweenFilterBuilder_; + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return Whether the betweenFilter field is set. + */ + @java.lang.Override + public boolean hasBetweenFilter() { + return oneFilterCase_ == 6; + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return The betweenFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilter getBetweenFilter() { + if (betweenFilterBuilder_ == null) { + if (oneFilterCase_ == 6) { + return (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } else { + if (oneFilterCase_ == 6) { + return betweenFilterBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + public Builder setBetweenFilter(com.google.analytics.data.v1beta.Filter.BetweenFilter value) { + if (betweenFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneFilter_ = value; + onChanged(); + } else { + betweenFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 6; + return this; + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + public Builder setBetweenFilter( + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder builderForValue) { + if (betweenFilterBuilder_ == null) { + oneFilter_ = builderForValue.build(); + onChanged(); + } else { + betweenFilterBuilder_.setMessage(builderForValue.build()); + } + oneFilterCase_ = 6; + return this; + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + public Builder mergeBetweenFilter(com.google.analytics.data.v1beta.Filter.BetweenFilter value) { + if (betweenFilterBuilder_ == null) { + if (oneFilterCase_ == 6 + && oneFilter_ + != com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance()) { + oneFilter_ = + com.google.analytics.data.v1beta.Filter.BetweenFilter.newBuilder( + (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + oneFilter_ = value; + } + onChanged(); + } else { + if (oneFilterCase_ == 6) { + betweenFilterBuilder_.mergeFrom(value); + } + betweenFilterBuilder_.setMessage(value); + } + oneFilterCase_ = 6; + return this; + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + public Builder clearBetweenFilter() { + if (betweenFilterBuilder_ == null) { + if (oneFilterCase_ == 6) { + oneFilterCase_ = 0; + oneFilter_ = null; + onChanged(); + } + } else { + if (oneFilterCase_ == 6) { + oneFilterCase_ = 0; + oneFilter_ = null; + } + betweenFilterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + public com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder getBetweenFilterBuilder() { + return getBetweenFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder + getBetweenFilterOrBuilder() { + if ((oneFilterCase_ == 6) && (betweenFilterBuilder_ != null)) { + return betweenFilterBuilder_.getMessageOrBuilder(); + } else { + if (oneFilterCase_ == 6) { + return (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_; + } + return com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A filter for two values.
+     * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.BetweenFilter, + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder, + com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder> + getBetweenFilterFieldBuilder() { + if (betweenFilterBuilder_ == null) { + if (!(oneFilterCase_ == 6)) { + oneFilter_ = com.google.analytics.data.v1beta.Filter.BetweenFilter.getDefaultInstance(); + } + betweenFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter.BetweenFilter, + com.google.analytics.data.v1beta.Filter.BetweenFilter.Builder, + com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder>( + (com.google.analytics.data.v1beta.Filter.BetweenFilter) oneFilter_, + getParentForChildren(), + isClean()); + oneFilter_ = null; + } + oneFilterCase_ = 6; + onChanged(); + ; + return betweenFilterBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Filter) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Filter) + private static final com.google.analytics.data.v1beta.Filter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Filter(); + } + + public static com.google.analytics.data.v1beta.Filter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Filter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Filter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Filter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpression.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpression.java new file mode 100644 index 00000000..2f6047b4 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpression.java @@ -0,0 +1,1786 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * To express dimension or metric filters.
+ * The fields in the same FilterExpression need to be either all dimensions or
+ * all metrics.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.FilterExpression} + */ +public final class FilterExpression extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.FilterExpression) + FilterExpressionOrBuilder { + private static final long serialVersionUID = 0L; + // Use FilterExpression.newBuilder() to construct. + private FilterExpression(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FilterExpression() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FilterExpression(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FilterExpression( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1beta.FilterExpressionList.Builder subBuilder = null; + if (exprCase_ == 1) { + subBuilder = + ((com.google.analytics.data.v1beta.FilterExpressionList) expr_).toBuilder(); + } + expr_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpressionList.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.data.v1beta.FilterExpressionList) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 1; + break; + } + case 18: + { + com.google.analytics.data.v1beta.FilterExpressionList.Builder subBuilder = null; + if (exprCase_ == 2) { + subBuilder = + ((com.google.analytics.data.v1beta.FilterExpressionList) expr_).toBuilder(); + } + expr_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpressionList.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.data.v1beta.FilterExpressionList) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 2; + break; + } + case 26: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (exprCase_ == 3) { + subBuilder = + ((com.google.analytics.data.v1beta.FilterExpression) expr_).toBuilder(); + } + expr_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.data.v1beta.FilterExpression) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 3; + break; + } + case 34: + { + com.google.analytics.data.v1beta.Filter.Builder subBuilder = null; + if (exprCase_ == 4) { + subBuilder = ((com.google.analytics.data.v1beta.Filter) expr_).toBuilder(); + } + expr_ = + input.readMessage( + com.google.analytics.data.v1beta.Filter.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.analytics.data.v1beta.Filter) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.FilterExpression.class, + com.google.analytics.data.v1beta.FilterExpression.Builder.class); + } + + private int exprCase_ = 0; + private java.lang.Object expr_; + + public enum ExprCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AND_GROUP(1), + OR_GROUP(2), + NOT_EXPRESSION(3), + FILTER(4), + EXPR_NOT_SET(0); + private final int value; + + private ExprCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExprCase valueOf(int value) { + return forNumber(value); + } + + public static ExprCase forNumber(int value) { + switch (value) { + case 1: + return AND_GROUP; + case 2: + return OR_GROUP; + case 3: + return NOT_EXPRESSION; + case 4: + return FILTER; + case 0: + return EXPR_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExprCase getExprCase() { + return ExprCase.forNumber(exprCase_); + } + + public static final int AND_GROUP_FIELD_NUMBER = 1; + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return Whether the andGroup field is set. + */ + @java.lang.Override + public boolean hasAndGroup() { + return exprCase_ == 1; + } + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return The andGroup. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getAndGroup() { + if (exprCase_ == 1) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getAndGroupOrBuilder() { + if (exprCase_ == 1) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + + public static final int OR_GROUP_FIELD_NUMBER = 2; + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return Whether the orGroup field is set. + */ + @java.lang.Override + public boolean hasOrGroup() { + return exprCase_ == 2; + } + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return The orGroup. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getOrGroup() { + if (exprCase_ == 2) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getOrGroupOrBuilder() { + if (exprCase_ == 2) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + + public static final int NOT_EXPRESSION_FIELD_NUMBER = 3; + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return Whether the notExpression field is set. + */ + @java.lang.Override + public boolean hasNotExpression() { + return exprCase_ == 3; + } + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return The notExpression. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getNotExpression() { + if (exprCase_ == 3) { + return (com.google.analytics.data.v1beta.FilterExpression) expr_; + } + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getNotExpressionOrBuilder() { + if (exprCase_ == 3) { + return (com.google.analytics.data.v1beta.FilterExpression) expr_; + } + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + + public static final int FILTER_FIELD_NUMBER = 4; + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return exprCase_ == 4; + } + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter getFilter() { + if (exprCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter) expr_; + } + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterOrBuilder getFilterOrBuilder() { + if (exprCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter) expr_; + } + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (exprCase_ == 1) { + output.writeMessage(1, (com.google.analytics.data.v1beta.FilterExpressionList) expr_); + } + if (exprCase_ == 2) { + output.writeMessage(2, (com.google.analytics.data.v1beta.FilterExpressionList) expr_); + } + if (exprCase_ == 3) { + output.writeMessage(3, (com.google.analytics.data.v1beta.FilterExpression) expr_); + } + if (exprCase_ == 4) { + output.writeMessage(4, (com.google.analytics.data.v1beta.Filter) expr_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exprCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.analytics.data.v1beta.FilterExpressionList) expr_); + } + if (exprCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.analytics.data.v1beta.FilterExpressionList) expr_); + } + if (exprCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.analytics.data.v1beta.FilterExpression) expr_); + } + if (exprCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.analytics.data.v1beta.Filter) expr_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.FilterExpression)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.FilterExpression other = + (com.google.analytics.data.v1beta.FilterExpression) obj; + + if (!getExprCase().equals(other.getExprCase())) return false; + switch (exprCase_) { + case 1: + if (!getAndGroup().equals(other.getAndGroup())) return false; + break; + case 2: + if (!getOrGroup().equals(other.getOrGroup())) return false; + break; + case 3: + if (!getNotExpression().equals(other.getNotExpression())) return false; + break; + case 4: + if (!getFilter().equals(other.getFilter())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (exprCase_) { + case 1: + hash = (37 * hash) + AND_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getAndGroup().hashCode(); + break; + case 2: + hash = (37 * hash) + OR_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getOrGroup().hashCode(); + break; + case 3: + hash = (37 * hash) + NOT_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getNotExpression().hashCode(); + break; + case 4: + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpression parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.FilterExpression prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * To express dimension or metric filters.
+   * The fields in the same FilterExpression need to be either all dimensions or
+   * all metrics.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.FilterExpression} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.FilterExpression) + com.google.analytics.data.v1beta.FilterExpressionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpression_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.FilterExpression.class, + com.google.analytics.data.v1beta.FilterExpression.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.FilterExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + exprCase_ = 0; + expr_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpression_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression build() { + com.google.analytics.data.v1beta.FilterExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression buildPartial() { + com.google.analytics.data.v1beta.FilterExpression result = + new com.google.analytics.data.v1beta.FilterExpression(this); + if (exprCase_ == 1) { + if (andGroupBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = andGroupBuilder_.build(); + } + } + if (exprCase_ == 2) { + if (orGroupBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = orGroupBuilder_.build(); + } + } + if (exprCase_ == 3) { + if (notExpressionBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = notExpressionBuilder_.build(); + } + } + if (exprCase_ == 4) { + if (filterBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = filterBuilder_.build(); + } + } + result.exprCase_ = exprCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.FilterExpression) { + return mergeFrom((com.google.analytics.data.v1beta.FilterExpression) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.FilterExpression other) { + if (other == com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance()) + return this; + switch (other.getExprCase()) { + case AND_GROUP: + { + mergeAndGroup(other.getAndGroup()); + break; + } + case OR_GROUP: + { + mergeOrGroup(other.getOrGroup()); + break; + } + case NOT_EXPRESSION: + { + mergeNotExpression(other.getNotExpression()); + break; + } + case FILTER: + { + mergeFilter(other.getFilter()); + break; + } + case EXPR_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.FilterExpression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.FilterExpression) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int exprCase_ = 0; + private java.lang.Object expr_; + + public ExprCase getExprCase() { + return ExprCase.forNumber(exprCase_); + } + + public Builder clearExpr() { + exprCase_ = 0; + expr_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder> + andGroupBuilder_; + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return Whether the andGroup field is set. + */ + @java.lang.Override + public boolean hasAndGroup() { + return exprCase_ == 1; + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return The andGroup. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getAndGroup() { + if (andGroupBuilder_ == null) { + if (exprCase_ == 1) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } else { + if (exprCase_ == 1) { + return andGroupBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + public Builder setAndGroup(com.google.analytics.data.v1beta.FilterExpressionList value) { + if (andGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + andGroupBuilder_.setMessage(value); + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + public Builder setAndGroup( + com.google.analytics.data.v1beta.FilterExpressionList.Builder builderForValue) { + if (andGroupBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + andGroupBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + public Builder mergeAndGroup(com.google.analytics.data.v1beta.FilterExpressionList value) { + if (andGroupBuilder_ == null) { + if (exprCase_ == 1 + && expr_ + != com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance()) { + expr_ = + com.google.analytics.data.v1beta.FilterExpressionList.newBuilder( + (com.google.analytics.data.v1beta.FilterExpressionList) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 1) { + andGroupBuilder_.mergeFrom(value); + } + andGroupBuilder_.setMessage(value); + } + exprCase_ = 1; + return this; + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + public Builder clearAndGroup() { + if (andGroupBuilder_ == null) { + if (exprCase_ == 1) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 1) { + exprCase_ = 0; + expr_ = null; + } + andGroupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + public com.google.analytics.data.v1beta.FilterExpressionList.Builder getAndGroupBuilder() { + return getAndGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getAndGroupOrBuilder() { + if ((exprCase_ == 1) && (andGroupBuilder_ != null)) { + return andGroupBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 1) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpressions in and_group have an AND relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder> + getAndGroupFieldBuilder() { + if (andGroupBuilder_ == null) { + if (!(exprCase_ == 1)) { + expr_ = com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + andGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder>( + (com.google.analytics.data.v1beta.FilterExpressionList) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 1; + onChanged(); + ; + return andGroupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder> + orGroupBuilder_; + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return Whether the orGroup field is set. + */ + @java.lang.Override + public boolean hasOrGroup() { + return exprCase_ == 2; + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return The orGroup. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getOrGroup() { + if (orGroupBuilder_ == null) { + if (exprCase_ == 2) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } else { + if (exprCase_ == 2) { + return orGroupBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + public Builder setOrGroup(com.google.analytics.data.v1beta.FilterExpressionList value) { + if (orGroupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + orGroupBuilder_.setMessage(value); + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + public Builder setOrGroup( + com.google.analytics.data.v1beta.FilterExpressionList.Builder builderForValue) { + if (orGroupBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + orGroupBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + public Builder mergeOrGroup(com.google.analytics.data.v1beta.FilterExpressionList value) { + if (orGroupBuilder_ == null) { + if (exprCase_ == 2 + && expr_ + != com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance()) { + expr_ = + com.google.analytics.data.v1beta.FilterExpressionList.newBuilder( + (com.google.analytics.data.v1beta.FilterExpressionList) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 2) { + orGroupBuilder_.mergeFrom(value); + } + orGroupBuilder_.setMessage(value); + } + exprCase_ = 2; + return this; + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + public Builder clearOrGroup() { + if (orGroupBuilder_ == null) { + if (exprCase_ == 2) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 2) { + exprCase_ = 0; + expr_ = null; + } + orGroupBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + public com.google.analytics.data.v1beta.FilterExpressionList.Builder getOrGroupBuilder() { + return getOrGroupFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getOrGroupOrBuilder() { + if ((exprCase_ == 2) && (orGroupBuilder_ != null)) { + return orGroupBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 2) { + return (com.google.analytics.data.v1beta.FilterExpressionList) expr_; + } + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpressions in or_group have an OR relationship.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder> + getOrGroupFieldBuilder() { + if (orGroupBuilder_ == null) { + if (!(exprCase_ == 2)) { + expr_ = com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + orGroupBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpressionList, + com.google.analytics.data.v1beta.FilterExpressionList.Builder, + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder>( + (com.google.analytics.data.v1beta.FilterExpressionList) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 2; + onChanged(); + ; + return orGroupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + notExpressionBuilder_; + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return Whether the notExpression field is set. + */ + @java.lang.Override + public boolean hasNotExpression() { + return exprCase_ == 3; + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return The notExpression. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getNotExpression() { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 3) { + return (com.google.analytics.data.v1beta.FilterExpression) expr_; + } + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } else { + if (exprCase_ == 3) { + return notExpressionBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + public Builder setNotExpression(com.google.analytics.data.v1beta.FilterExpression value) { + if (notExpressionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + notExpressionBuilder_.setMessage(value); + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + public Builder setNotExpression( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (notExpressionBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + notExpressionBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + public Builder mergeNotExpression(com.google.analytics.data.v1beta.FilterExpression value) { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 3 + && expr_ != com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance()) { + expr_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder( + (com.google.analytics.data.v1beta.FilterExpression) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 3) { + notExpressionBuilder_.mergeFrom(value); + } + notExpressionBuilder_.setMessage(value); + } + exprCase_ = 3; + return this; + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + public Builder clearNotExpression() { + if (notExpressionBuilder_ == null) { + if (exprCase_ == 3) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 3) { + exprCase_ = 0; + expr_ = null; + } + notExpressionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getNotExpressionBuilder() { + return getNotExpressionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getNotExpressionOrBuilder() { + if ((exprCase_ == 3) && (notExpressionBuilder_ != null)) { + return notExpressionBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 3) { + return (com.google.analytics.data.v1beta.FilterExpression) expr_; + } + return com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + } + /** + * + * + *
+     * The FilterExpression is NOT of not_expression.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getNotExpressionFieldBuilder() { + if (notExpressionBuilder_ == null) { + if (!(exprCase_ == 3)) { + expr_ = com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance(); + } + notExpressionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + (com.google.analytics.data.v1beta.FilterExpression) expr_, + getParentForChildren(), + isClean()); + expr_ = null; + } + exprCase_ = 3; + onChanged(); + ; + return notExpressionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter, + com.google.analytics.data.v1beta.Filter.Builder, + com.google.analytics.data.v1beta.FilterOrBuilder> + filterBuilder_; + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return exprCase_ == 4; + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Filter getFilter() { + if (filterBuilder_ == null) { + if (exprCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter) expr_; + } + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } else { + if (exprCase_ == 4) { + return filterBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + public Builder setFilter(com.google.analytics.data.v1beta.Filter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expr_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + exprCase_ = 4; + return this; + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + public Builder setFilter(com.google.analytics.data.v1beta.Filter.Builder builderForValue) { + if (filterBuilder_ == null) { + expr_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + exprCase_ = 4; + return this; + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + public Builder mergeFilter(com.google.analytics.data.v1beta.Filter value) { + if (filterBuilder_ == null) { + if (exprCase_ == 4 + && expr_ != com.google.analytics.data.v1beta.Filter.getDefaultInstance()) { + expr_ = + com.google.analytics.data.v1beta.Filter.newBuilder( + (com.google.analytics.data.v1beta.Filter) expr_) + .mergeFrom(value) + .buildPartial(); + } else { + expr_ = value; + } + onChanged(); + } else { + if (exprCase_ == 4) { + filterBuilder_.mergeFrom(value); + } + filterBuilder_.setMessage(value); + } + exprCase_ = 4; + return this; + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + public Builder clearFilter() { + if (filterBuilder_ == null) { + if (exprCase_ == 4) { + exprCase_ = 0; + expr_ = null; + onChanged(); + } + } else { + if (exprCase_ == 4) { + exprCase_ = 0; + expr_ = null; + } + filterBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + public com.google.analytics.data.v1beta.Filter.Builder getFilterBuilder() { + return getFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterOrBuilder getFilterOrBuilder() { + if ((exprCase_ == 4) && (filterBuilder_ != null)) { + return filterBuilder_.getMessageOrBuilder(); + } else { + if (exprCase_ == 4) { + return (com.google.analytics.data.v1beta.Filter) expr_; + } + return com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + } + /** + * + * + *
+     * A primitive filter.
+     * All fields in filter in same FilterExpression needs to be either all
+     * dimensions or metrics.
+     * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter, + com.google.analytics.data.v1beta.Filter.Builder, + com.google.analytics.data.v1beta.FilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + if (!(exprCase_ == 4)) { + expr_ = com.google.analytics.data.v1beta.Filter.getDefaultInstance(); + } + filterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.Filter, + com.google.analytics.data.v1beta.Filter.Builder, + com.google.analytics.data.v1beta.FilterOrBuilder>( + (com.google.analytics.data.v1beta.Filter) expr_, getParentForChildren(), isClean()); + expr_ = null; + } + exprCase_ = 4; + onChanged(); + ; + return filterBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.FilterExpression) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.FilterExpression) + private static final com.google.analytics.data.v1beta.FilterExpression DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.FilterExpression(); + } + + public static com.google.analytics.data.v1beta.FilterExpression getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FilterExpression parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FilterExpression(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionList.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionList.java new file mode 100644 index 00000000..b98c33ca --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionList.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * A list of filter expressions.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.FilterExpressionList} + */ +public final class FilterExpressionList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.FilterExpressionList) + FilterExpressionListOrBuilder { + private static final long serialVersionUID = 0L; + // Use FilterExpressionList.newBuilder() to construct. + private FilterExpressionList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FilterExpressionList() { + expressions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FilterExpressionList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FilterExpressionList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + expressions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + expressions_.add( + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + expressions_ = java.util.Collections.unmodifiableList(expressions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpressionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.FilterExpressionList.class, + com.google.analytics.data.v1beta.FilterExpressionList.Builder.class); + } + + public static final int EXPRESSIONS_FIELD_NUMBER = 1; + private java.util.List expressions_; + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + @java.lang.Override + public java.util.List getExpressionsList() { + return expressions_; + } + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + @java.lang.Override + public java.util.List + getExpressionsOrBuilderList() { + return expressions_; + } + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + @java.lang.Override + public int getExpressionsCount() { + return expressions_.size(); + } + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getExpressions(int index) { + return expressions_.get(index); + } + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getExpressionsOrBuilder( + int index) { + return expressions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < expressions_.size(); i++) { + output.writeMessage(1, expressions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < expressions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, expressions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.FilterExpressionList)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.FilterExpressionList other = + (com.google.analytics.data.v1beta.FilterExpressionList) obj; + + if (!getExpressionsList().equals(other.getExpressionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExpressionsCount() > 0) { + hash = (37 * hash) + EXPRESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getExpressionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.FilterExpressionList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.FilterExpressionList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.FilterExpressionList) + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpressionList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.FilterExpressionList.class, + com.google.analytics.data.v1beta.FilterExpressionList.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.FilterExpressionList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpressionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (expressionsBuilder_ == null) { + expressions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + expressionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList build() { + com.google.analytics.data.v1beta.FilterExpressionList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList buildPartial() { + com.google.analytics.data.v1beta.FilterExpressionList result = + new com.google.analytics.data.v1beta.FilterExpressionList(this); + int from_bitField0_ = bitField0_; + if (expressionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + expressions_ = java.util.Collections.unmodifiableList(expressions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.expressions_ = expressions_; + } else { + result.expressions_ = expressionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.FilterExpressionList) { + return mergeFrom((com.google.analytics.data.v1beta.FilterExpressionList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.FilterExpressionList other) { + if (other == com.google.analytics.data.v1beta.FilterExpressionList.getDefaultInstance()) + return this; + if (expressionsBuilder_ == null) { + if (!other.expressions_.isEmpty()) { + if (expressions_.isEmpty()) { + expressions_ = other.expressions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExpressionsIsMutable(); + expressions_.addAll(other.expressions_); + } + onChanged(); + } + } else { + if (!other.expressions_.isEmpty()) { + if (expressionsBuilder_.isEmpty()) { + expressionsBuilder_.dispose(); + expressionsBuilder_ = null; + expressions_ = other.expressions_; + bitField0_ = (bitField0_ & ~0x00000001); + expressionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExpressionsFieldBuilder() + : null; + } else { + expressionsBuilder_.addAllMessages(other.expressions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.FilterExpressionList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.FilterExpressionList) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List expressions_ = + java.util.Collections.emptyList(); + + private void ensureExpressionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + expressions_ = + new java.util.ArrayList( + expressions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + expressionsBuilder_; + + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public java.util.List getExpressionsList() { + if (expressionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(expressions_); + } else { + return expressionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public int getExpressionsCount() { + if (expressionsBuilder_ == null) { + return expressions_.size(); + } else { + return expressionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public com.google.analytics.data.v1beta.FilterExpression getExpressions(int index) { + if (expressionsBuilder_ == null) { + return expressions_.get(index); + } else { + return expressionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder setExpressions( + int index, com.google.analytics.data.v1beta.FilterExpression value) { + if (expressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExpressionsIsMutable(); + expressions_.set(index, value); + onChanged(); + } else { + expressionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder setExpressions( + int index, com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + expressions_.set(index, builderForValue.build()); + onChanged(); + } else { + expressionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder addExpressions(com.google.analytics.data.v1beta.FilterExpression value) { + if (expressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExpressionsIsMutable(); + expressions_.add(value); + onChanged(); + } else { + expressionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder addExpressions( + int index, com.google.analytics.data.v1beta.FilterExpression value) { + if (expressionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExpressionsIsMutable(); + expressions_.add(index, value); + onChanged(); + } else { + expressionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder addExpressions( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + expressions_.add(builderForValue.build()); + onChanged(); + } else { + expressionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder addExpressions( + int index, com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + expressions_.add(index, builderForValue.build()); + onChanged(); + } else { + expressionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder addAllExpressions( + java.lang.Iterable values) { + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, expressions_); + onChanged(); + } else { + expressionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder clearExpressions() { + if (expressionsBuilder_ == null) { + expressions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + expressionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public Builder removeExpressions(int index) { + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + expressions_.remove(index); + onChanged(); + } else { + expressionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getExpressionsBuilder( + int index) { + return getExpressionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getExpressionsOrBuilder( + int index) { + if (expressionsBuilder_ == null) { + return expressions_.get(index); + } else { + return expressionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public java.util.List + getExpressionsOrBuilderList() { + if (expressionsBuilder_ != null) { + return expressionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(expressions_); + } + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder addExpressionsBuilder() { + return getExpressionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance()); + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder addExpressionsBuilder( + int index) { + return getExpressionsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance()); + } + /** + * + * + *
+     * A list of filter expressions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + public java.util.List + getExpressionsBuilderList() { + return getExpressionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getExpressionsFieldBuilder() { + if (expressionsBuilder_ == null) { + expressionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + expressions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + expressions_ = null; + } + return expressionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.FilterExpressionList) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.FilterExpressionList) + private static final com.google.analytics.data.v1beta.FilterExpressionList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.FilterExpressionList(); + } + + public static com.google.analytics.data.v1beta.FilterExpressionList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FilterExpressionList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FilterExpressionList(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionListOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionListOrBuilder.java new file mode 100644 index 00000000..6a5721b6 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionListOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface FilterExpressionListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.FilterExpressionList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + java.util.List getExpressionsList(); + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + com.google.analytics.data.v1beta.FilterExpression getExpressions(int index); + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + int getExpressionsCount(); + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + java.util.List + getExpressionsOrBuilderList(); + /** + * + * + *
+   * A list of filter expressions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.FilterExpression expressions = 1; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getExpressionsOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionOrBuilder.java new file mode 100644 index 00000000..336de25a --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionOrBuilder.java @@ -0,0 +1,173 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface FilterExpressionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.FilterExpression) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return Whether the andGroup field is set. + */ + boolean hasAndGroup(); + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + * + * @return The andGroup. + */ + com.google.analytics.data.v1beta.FilterExpressionList getAndGroup(); + /** + * + * + *
+   * The FilterExpressions in and_group have an AND relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList and_group = 1; + */ + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getAndGroupOrBuilder(); + + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return Whether the orGroup field is set. + */ + boolean hasOrGroup(); + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + * + * @return The orGroup. + */ + com.google.analytics.data.v1beta.FilterExpressionList getOrGroup(); + /** + * + * + *
+   * The FilterExpressions in or_group have an OR relationship.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpressionList or_group = 2; + */ + com.google.analytics.data.v1beta.FilterExpressionListOrBuilder getOrGroupOrBuilder(); + + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return Whether the notExpression field is set. + */ + boolean hasNotExpression(); + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + * + * @return The notExpression. + */ + com.google.analytics.data.v1beta.FilterExpression getNotExpression(); + /** + * + * + *
+   * The FilterExpression is NOT of not_expression.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression not_expression = 3; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getNotExpressionOrBuilder(); + + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + * + * @return The filter. + */ + com.google.analytics.data.v1beta.Filter getFilter(); + /** + * + * + *
+   * A primitive filter.
+   * All fields in filter in same FilterExpression needs to be either all
+   * dimensions or metrics.
+   * 
+ * + * .google.analytics.data.v1beta.Filter filter = 4; + */ + com.google.analytics.data.v1beta.FilterOrBuilder getFilterOrBuilder(); + + public com.google.analytics.data.v1beta.FilterExpression.ExprCase getExprCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterOrBuilder.java new file mode 100644 index 00000000..0062312f --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface FilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Filter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The dimension name or metric name. Must be a name defined in dimensions
+   * or metrics.
+   * 
+ * + * string field_name = 1; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + /** + * + * + *
+   * The dimension name or metric name. Must be a name defined in dimensions
+   * or metrics.
+   * 
+ * + * string field_name = 1; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return Whether the stringFilter field is set. + */ + boolean hasStringFilter(); + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + * + * @return The stringFilter. + */ + com.google.analytics.data.v1beta.Filter.StringFilter getStringFilter(); + /** + * + * + *
+   * Strings related filter.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.StringFilter string_filter = 3; + */ + com.google.analytics.data.v1beta.Filter.StringFilterOrBuilder getStringFilterOrBuilder(); + + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return Whether the inListFilter field is set. + */ + boolean hasInListFilter(); + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + * + * @return The inListFilter. + */ + com.google.analytics.data.v1beta.Filter.InListFilter getInListFilter(); + /** + * + * + *
+   * A filter for in list values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.InListFilter in_list_filter = 4; + */ + com.google.analytics.data.v1beta.Filter.InListFilterOrBuilder getInListFilterOrBuilder(); + + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return Whether the numericFilter field is set. + */ + boolean hasNumericFilter(); + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + * + * @return The numericFilter. + */ + com.google.analytics.data.v1beta.Filter.NumericFilter getNumericFilter(); + /** + * + * + *
+   * A filter for numeric or date values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.NumericFilter numeric_filter = 5; + */ + com.google.analytics.data.v1beta.Filter.NumericFilterOrBuilder getNumericFilterOrBuilder(); + + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return Whether the betweenFilter field is set. + */ + boolean hasBetweenFilter(); + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + * + * @return The betweenFilter. + */ + com.google.analytics.data.v1beta.Filter.BetweenFilter getBetweenFilter(); + /** + * + * + *
+   * A filter for two values.
+   * 
+ * + * .google.analytics.data.v1beta.Filter.BetweenFilter between_filter = 6; + */ + com.google.analytics.data.v1beta.Filter.BetweenFilterOrBuilder getBetweenFilterOrBuilder(); + + public com.google.analytics.data.v1beta.Filter.OneFilterCase getOneFilterCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequest.java new file mode 100644 index 00000000..38fd6f02 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequest.java @@ -0,0 +1,706 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Request for a property's dimension and metric metadata.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.GetMetadataRequest} + */ +public final class GetMetadataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.GetMetadataRequest) + GetMetadataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetMetadataRequest.newBuilder() to construct. + private GetMetadataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetMetadataRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetMetadataRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetMetadataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_GetMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.GetMetadataRequest.class, + com.google.analytics.data.v1beta.GetMetadataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the metadata to retrieve. This name field is
+   * specified in the URL path and not URL parameters. Property is a numeric
+   * Google Analytics GA4 Property identifier. To learn more, see [where to find
+   * your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234/metadata
+   * Set the Property ID to 0 for dimensions and metrics common to all
+   * properties. In this special mode, this method will not return custom
+   * dimensions and metrics.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the metadata to retrieve. This name field is
+   * specified in the URL path and not URL parameters. Property is a numeric
+   * Google Analytics GA4 Property identifier. To learn more, see [where to find
+   * your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234/metadata
+   * Set the Property ID to 0 for dimensions and metrics common to all
+   * properties. In this special mode, this method will not return custom
+   * dimensions and metrics.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.GetMetadataRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.GetMetadataRequest other = + (com.google.analytics.data.v1beta.GetMetadataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.GetMetadataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for a property's dimension and metric metadata.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.GetMetadataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.GetMetadataRequest) + com.google.analytics.data.v1beta.GetMetadataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_GetMetadataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.GetMetadataRequest.class, + com.google.analytics.data.v1beta.GetMetadataRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.GetMetadataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_GetMetadataRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.GetMetadataRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.GetMetadataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.GetMetadataRequest build() { + com.google.analytics.data.v1beta.GetMetadataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.GetMetadataRequest buildPartial() { + com.google.analytics.data.v1beta.GetMetadataRequest result = + new com.google.analytics.data.v1beta.GetMetadataRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.GetMetadataRequest) { + return mergeFrom((com.google.analytics.data.v1beta.GetMetadataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.GetMetadataRequest other) { + if (other == com.google.analytics.data.v1beta.GetMetadataRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.GetMetadataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.GetMetadataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the metadata to retrieve. This name field is
+     * specified in the URL path and not URL parameters. Property is a numeric
+     * Google Analytics GA4 Property identifier. To learn more, see [where to find
+     * your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234/metadata
+     * Set the Property ID to 0 for dimensions and metrics common to all
+     * properties. In this special mode, this method will not return custom
+     * dimensions and metrics.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the metadata to retrieve. This name field is
+     * specified in the URL path and not URL parameters. Property is a numeric
+     * Google Analytics GA4 Property identifier. To learn more, see [where to find
+     * your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234/metadata
+     * Set the Property ID to 0 for dimensions and metrics common to all
+     * properties. In this special mode, this method will not return custom
+     * dimensions and metrics.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the metadata to retrieve. This name field is
+     * specified in the URL path and not URL parameters. Property is a numeric
+     * Google Analytics GA4 Property identifier. To learn more, see [where to find
+     * your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234/metadata
+     * Set the Property ID to 0 for dimensions and metrics common to all
+     * properties. In this special mode, this method will not return custom
+     * dimensions and metrics.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the metadata to retrieve. This name field is
+     * specified in the URL path and not URL parameters. Property is a numeric
+     * Google Analytics GA4 Property identifier. To learn more, see [where to find
+     * your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234/metadata
+     * Set the Property ID to 0 for dimensions and metrics common to all
+     * properties. In this special mode, this method will not return custom
+     * dimensions and metrics.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the metadata to retrieve. This name field is
+     * specified in the URL path and not URL parameters. Property is a numeric
+     * Google Analytics GA4 Property identifier. To learn more, see [where to find
+     * your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234/metadata
+     * Set the Property ID to 0 for dimensions and metrics common to all
+     * properties. In this special mode, this method will not return custom
+     * dimensions and metrics.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.GetMetadataRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.GetMetadataRequest) + private static final com.google.analytics.data.v1beta.GetMetadataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.GetMetadataRequest(); + } + + public static com.google.analytics.data.v1beta.GetMetadataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetMetadataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetMetadataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.GetMetadataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequestOrBuilder.java new file mode 100644 index 00000000..38f0c4f1 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface GetMetadataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.GetMetadataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the metadata to retrieve. This name field is
+   * specified in the URL path and not URL parameters. Property is a numeric
+   * Google Analytics GA4 Property identifier. To learn more, see [where to find
+   * your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234/metadata
+   * Set the Property ID to 0 for dimensions and metrics common to all
+   * properties. In this special mode, this method will not return custom
+   * dimensions and metrics.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the metadata to retrieve. This name field is
+   * specified in the URL path and not URL parameters. Property is a numeric
+   * Google Analytics GA4 Property identifier. To learn more, see [where to find
+   * your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234/metadata
+   * Set the Property ID to 0 for dimensions and metrics common to all
+   * properties. In this special mode, this method will not return custom
+   * dimensions and metrics.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metadata.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metadata.java new file mode 100644 index 00000000..985c611c --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metadata.java @@ -0,0 +1,1628 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The dimensions and metrics currently accepted in reporting methods.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Metadata} + */ +public final class Metadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metadata() { + name_ = ""; + dimensions_ = java.util.Collections.emptyList(); + metrics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensions_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionMetadata.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metrics_.add( + input.readMessage( + com.google.analytics.data.v1beta.MetricMetadata.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Metadata.class, + com.google.analytics.data.v1beta.Metadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name of this metadata.
+   * 
+ * + * string name = 3; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of this metadata.
+   * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSIONS_FIELD_NUMBER = 1; + private java.util.List dimensions_; + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + @java.lang.Override + public java.util.List getDimensionsList() { + return dimensions_; + } + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + @java.lang.Override + public java.util.List + getDimensionsOrBuilderList() { + return dimensions_; + } + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + @java.lang.Override + public int getDimensionsCount() { + return dimensions_.size(); + } + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadata getDimensions(int index) { + return dimensions_.get(index); + } + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionMetadataOrBuilder getDimensionsOrBuilder( + int index) { + return dimensions_.get(index); + } + + public static final int METRICS_FIELD_NUMBER = 2; + private java.util.List metrics_; + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadata getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadataOrBuilder getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensions_.size(); i++) { + output.writeMessage(1, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(2, metrics_.get(i)); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metrics_.get(i)); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Metadata)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Metadata other = + (com.google.analytics.data.v1beta.Metadata) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDimensionsList().equals(other.getDimensionsList())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getDimensionsCount() > 0) { + hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionsList().hashCode(); + } + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The dimensions and metrics currently accepted in reporting methods.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Metadata) + com.google.analytics.data.v1beta.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Metadata.class, + com.google.analytics.data.v1beta.Metadata.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Metadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionsFieldBuilder(); + getMetricsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionsBuilder_.clear(); + } + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_Metadata_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metadata getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metadata build() { + com.google.analytics.data.v1beta.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metadata buildPartial() { + com.google.analytics.data.v1beta.Metadata result = + new com.google.analytics.data.v1beta.Metadata(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (dimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensions_ = dimensions_; + } else { + result.dimensions_ = dimensionsBuilder_.build(); + } + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Metadata) { + return mergeFrom((com.google.analytics.data.v1beta.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Metadata other) { + if (other == com.google.analytics.data.v1beta.Metadata.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (dimensionsBuilder_ == null) { + if (!other.dimensions_.isEmpty()) { + if (dimensions_.isEmpty()) { + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionsIsMutable(); + dimensions_.addAll(other.dimensions_); + } + onChanged(); + } + } else { + if (!other.dimensions_.isEmpty()) { + if (dimensionsBuilder_.isEmpty()) { + dimensionsBuilder_.dispose(); + dimensionsBuilder_ = null; + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionsFieldBuilder() + : null; + } else { + dimensionsBuilder_.addAllMessages(other.dimensions_); + } + } + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Metadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Metadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of this metadata.
+     * 
+ * + * string name = 3; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of this metadata.
+     * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of this metadata.
+     * 
+ * + * string name = 3; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of this metadata.
+     * 
+ * + * string name = 3; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of this metadata.
+     * 
+ * + * string name = 3; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List dimensions_ = + java.util.Collections.emptyList(); + + private void ensureDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensions_ = + new java.util.ArrayList( + dimensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionMetadata, + com.google.analytics.data.v1beta.DimensionMetadata.Builder, + com.google.analytics.data.v1beta.DimensionMetadataOrBuilder> + dimensionsBuilder_; + + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public java.util.List getDimensionsList() { + if (dimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensions_); + } else { + return dimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public int getDimensionsCount() { + if (dimensionsBuilder_ == null) { + return dimensions_.size(); + } else { + return dimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public com.google.analytics.data.v1beta.DimensionMetadata getDimensions(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1beta.DimensionMetadata value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.set(index, value); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1beta.DimensionMetadata.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder addDimensions(com.google.analytics.data.v1beta.DimensionMetadata value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1beta.DimensionMetadata value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(index, value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder addDimensions( + com.google.analytics.data.v1beta.DimensionMetadata.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1beta.DimensionMetadata.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder addAllDimensions( + java.lang.Iterable values) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensions_); + onChanged(); + } else { + dimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder clearDimensions() { + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public Builder removeDimensions(int index) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.remove(index); + onChanged(); + } else { + dimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public com.google.analytics.data.v1beta.DimensionMetadata.Builder getDimensionsBuilder( + int index) { + return getDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public com.google.analytics.data.v1beta.DimensionMetadataOrBuilder getDimensionsOrBuilder( + int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public java.util.List + getDimensionsOrBuilderList() { + if (dimensionsBuilder_ != null) { + return dimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensions_); + } + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public com.google.analytics.data.v1beta.DimensionMetadata.Builder addDimensionsBuilder() { + return getDimensionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public com.google.analytics.data.v1beta.DimensionMetadata.Builder addDimensionsBuilder( + int index) { + return getDimensionsFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.DimensionMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * The dimension descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + public java.util.List + getDimensionsBuilderList() { + return getDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionMetadata, + com.google.analytics.data.v1beta.DimensionMetadata.Builder, + com.google.analytics.data.v1beta.DimensionMetadataOrBuilder> + getDimensionsFieldBuilder() { + if (dimensionsBuilder_ == null) { + dimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionMetadata, + com.google.analytics.data.v1beta.DimensionMetadata.Builder, + com.google.analytics.data.v1beta.DimensionMetadataOrBuilder>( + dimensions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dimensions_ = null; + } + return dimensionsBuilder_; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metrics_ = + new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricMetadata, + com.google.analytics.data.v1beta.MetricMetadata.Builder, + com.google.analytics.data.v1beta.MetricMetadataOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public com.google.analytics.data.v1beta.MetricMetadata getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder setMetrics(int index, com.google.analytics.data.v1beta.MetricMetadata value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder setMetrics( + int index, com.google.analytics.data.v1beta.MetricMetadata.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.MetricMetadata value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder addMetrics(int index, com.google.analytics.data.v1beta.MetricMetadata value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder addMetrics( + com.google.analytics.data.v1beta.MetricMetadata.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder addMetrics( + int index, com.google.analytics.data.v1beta.MetricMetadata.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public com.google.analytics.data.v1beta.MetricMetadata.Builder getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public com.google.analytics.data.v1beta.MetricMetadataOrBuilder getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public com.google.analytics.data.v1beta.MetricMetadata.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.MetricMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public com.google.analytics.data.v1beta.MetricMetadata.Builder addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.MetricMetadata.getDefaultInstance()); + } + /** + * + * + *
+     * The metric descriptions.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + public java.util.List + getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricMetadata, + com.google.analytics.data.v1beta.MetricMetadata.Builder, + com.google.analytics.data.v1beta.MetricMetadataOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricMetadata, + com.google.analytics.data.v1beta.MetricMetadata.Builder, + com.google.analytics.data.v1beta.MetricMetadataOrBuilder>( + metrics_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Metadata) + private static final com.google.analytics.data.v1beta.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Metadata(); + } + + public static com.google.analytics.data.v1beta.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataName.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataName.java new file mode 100644 index 00000000..e9b991eb --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2020 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. + */ + +package com.google.analytics.data.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class MetadataName implements ResourceName { + private static final PathTemplate PROPERTY = + PathTemplate.createWithoutUrlEncoding("properties/{property}/metadata"); + private volatile Map fieldValuesMap; + private final String property; + + @Deprecated + protected MetadataName() { + property = null; + } + + private MetadataName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + } + + public String getProperty() { + return property; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static MetadataName of(String property) { + return newBuilder().setProperty(property).build(); + } + + public static String format(String property) { + return newBuilder().setProperty(property).build().toString(); + } + + public static MetadataName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROPERTY.validatedMatch( + formattedString, "MetadataName.parse: formattedString not in valid format"); + return of(matchMap.get("property")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (MetadataName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROPERTY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (property != null) { + fieldMapBuilder.put("property", property); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROPERTY.instantiate("property", property); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + MetadataName that = ((MetadataName) o); + return Objects.equals(this.property, that.property); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + + /** Builder for properties/{property}/metadata. */ + public static class Builder { + private String property; + + protected Builder() {} + + public String getProperty() { + return property; + } + + public Builder setProperty(String property) { + this.property = property; + return this; + } + + private Builder(MetadataName metadataName) { + property = metadataName.property; + } + + public MetadataName build() { + return new MetadataName(this); + } + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataOrBuilder.java new file mode 100644 index 00000000..ed46aad8 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of this metadata.
+   * 
+ * + * string name = 3; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of this metadata.
+   * 
+ * + * string name = 3; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + java.util.List getDimensionsList(); + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + com.google.analytics.data.v1beta.DimensionMetadata getDimensions(int index); + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + int getDimensionsCount(); + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + java.util.List + getDimensionsOrBuilderList(); + /** + * + * + *
+   * The dimension descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionMetadata dimensions = 1; + */ + com.google.analytics.data.v1beta.DimensionMetadataOrBuilder getDimensionsOrBuilder(int index); + + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + com.google.analytics.data.v1beta.MetricMetadata getMetrics(int index); + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + int getMetricsCount(); + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * The metric descriptions.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricMetadata metrics = 2; + */ + com.google.analytics.data.v1beta.MetricMetadataOrBuilder getMetricsOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metric.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metric.java new file mode 100644 index 00000000..0c381ce2 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metric.java @@ -0,0 +1,984 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The quantitative measurements of a report. For example, the metric
+ * `eventCount` is the total number of events. Requests are allowed up to 10
+ * metrics.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Metric} + */ +public final class Metric extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Metric) + MetricOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metric.newBuilder() to construct. + private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metric() { + name_ = ""; + expression_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metric(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Metric( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + expression_ = s; + break; + } + case 24: + { + invisible_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Metric.class, + com.google.analytics.data.v1beta.Metric.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The name of the metric. See the [API
+   * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+   * for the list of metric names.
+   * If `expression` is specified, `name` can be any string that you would like
+   * within the allowed character set. For example if `expression` is
+   * `screenPageViews/sessions`, you could call that metric's name =
+   * `viewsPerSession`. Metric names that you choose must match the regular
+   * expression "^[a-zA-Z0-9_]$".
+   * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+   * `expression`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the metric. See the [API
+   * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+   * for the list of metric names.
+   * If `expression` is specified, `name` can be any string that you would like
+   * within the allowed character set. For example if `expression` is
+   * `screenPageViews/sessions`, you could call that metric's name =
+   * `viewsPerSession`. Metric names that you choose must match the regular
+   * expression "^[a-zA-Z0-9_]$".
+   * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+   * `expression`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPRESSION_FIELD_NUMBER = 2; + private volatile java.lang.Object expression_; + /** + * + * + *
+   * A mathematical expression for derived metrics. For example, the metric
+   * Event count per user is `eventCount/totalUsers`.
+   * 
+ * + * string expression = 2; + * + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } + } + /** + * + * + *
+   * A mathematical expression for derived metrics. For example, the metric
+   * Event count per user is `eventCount/totalUsers`.
+   * 
+ * + * string expression = 2; + * + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVISIBLE_FIELD_NUMBER = 3; + private boolean invisible_; + /** + * + * + *
+   * Indicates if a metric is invisible in the report response. If a metric is
+   * invisible, the metric will not produce a column in the response, but can be
+   * used in `metricFilter`, `orderBys`, or a metric `expression`.
+   * 
+ * + * bool invisible = 3; + * + * @return The invisible. + */ + @java.lang.Override + public boolean getInvisible() { + return invisible_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getExpressionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, expression_); + } + if (invisible_ != false) { + output.writeBool(3, invisible_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getExpressionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, expression_); + } + if (invisible_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, invisible_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Metric)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Metric other = (com.google.analytics.data.v1beta.Metric) obj; + + if (!getName().equals(other.getName())) return false; + if (!getExpression().equals(other.getExpression())) return false; + if (getInvisible() != other.getInvisible()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (37 * hash) + INVISIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInvisible()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Metric parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metric parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metric parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Metric parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Metric prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The quantitative measurements of a report. For example, the metric
+   * `eventCount` is the total number of events. Requests are allowed up to 10
+   * metrics.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Metric} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Metric) + com.google.analytics.data.v1beta.MetricOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Metric_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Metric_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Metric.class, + com.google.analytics.data.v1beta.Metric.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Metric.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + expression_ = ""; + + invisible_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Metric_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metric getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Metric.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metric build() { + com.google.analytics.data.v1beta.Metric result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metric buildPartial() { + com.google.analytics.data.v1beta.Metric result = + new com.google.analytics.data.v1beta.Metric(this); + result.name_ = name_; + result.expression_ = expression_; + result.invisible_ = invisible_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Metric) { + return mergeFrom((com.google.analytics.data.v1beta.Metric) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Metric other) { + if (other == com.google.analytics.data.v1beta.Metric.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + onChanged(); + } + if (other.getInvisible() != false) { + setInvisible(other.getInvisible()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Metric parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Metric) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The name of the metric. See the [API
+     * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+     * for the list of metric names.
+     * If `expression` is specified, `name` can be any string that you would like
+     * within the allowed character set. For example if `expression` is
+     * `screenPageViews/sessions`, you could call that metric's name =
+     * `viewsPerSession`. Metric names that you choose must match the regular
+     * expression "^[a-zA-Z0-9_]$".
+     * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+     * `expression`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the metric. See the [API
+     * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+     * for the list of metric names.
+     * If `expression` is specified, `name` can be any string that you would like
+     * within the allowed character set. For example if `expression` is
+     * `screenPageViews/sessions`, you could call that metric's name =
+     * `viewsPerSession`. Metric names that you choose must match the regular
+     * expression "^[a-zA-Z0-9_]$".
+     * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+     * `expression`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the metric. See the [API
+     * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+     * for the list of metric names.
+     * If `expression` is specified, `name` can be any string that you would like
+     * within the allowed character set. For example if `expression` is
+     * `screenPageViews/sessions`, you could call that metric's name =
+     * `viewsPerSession`. Metric names that you choose must match the regular
+     * expression "^[a-zA-Z0-9_]$".
+     * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+     * `expression`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the metric. See the [API
+     * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+     * for the list of metric names.
+     * If `expression` is specified, `name` can be any string that you would like
+     * within the allowed character set. For example if `expression` is
+     * `screenPageViews/sessions`, you could call that metric's name =
+     * `viewsPerSession`. Metric names that you choose must match the regular
+     * expression "^[a-zA-Z0-9_]$".
+     * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+     * `expression`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the metric. See the [API
+     * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+     * for the list of metric names.
+     * If `expression` is specified, `name` can be any string that you would like
+     * within the allowed character set. For example if `expression` is
+     * `screenPageViews/sessions`, you could call that metric's name =
+     * `viewsPerSession`. Metric names that you choose must match the regular
+     * expression "^[a-zA-Z0-9_]$".
+     * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+     * `expression`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object expression_ = ""; + /** + * + * + *
+     * A mathematical expression for derived metrics. For example, the metric
+     * Event count per user is `eventCount/totalUsers`.
+     * 
+ * + * string expression = 2; + * + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A mathematical expression for derived metrics. For example, the metric
+     * Event count per user is `eventCount/totalUsers`.
+     * 
+ * + * string expression = 2; + * + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A mathematical expression for derived metrics. For example, the metric
+     * Event count per user is `eventCount/totalUsers`.
+     * 
+ * + * string expression = 2; + * + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + expression_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A mathematical expression for derived metrics. For example, the metric
+     * Event count per user is `eventCount/totalUsers`.
+     * 
+ * + * string expression = 2; + * + * @return This builder for chaining. + */ + public Builder clearExpression() { + + expression_ = getDefaultInstance().getExpression(); + onChanged(); + return this; + } + /** + * + * + *
+     * A mathematical expression for derived metrics. For example, the metric
+     * Event count per user is `eventCount/totalUsers`.
+     * 
+ * + * string expression = 2; + * + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + expression_ = value; + onChanged(); + return this; + } + + private boolean invisible_; + /** + * + * + *
+     * Indicates if a metric is invisible in the report response. If a metric is
+     * invisible, the metric will not produce a column in the response, but can be
+     * used in `metricFilter`, `orderBys`, or a metric `expression`.
+     * 
+ * + * bool invisible = 3; + * + * @return The invisible. + */ + @java.lang.Override + public boolean getInvisible() { + return invisible_; + } + /** + * + * + *
+     * Indicates if a metric is invisible in the report response. If a metric is
+     * invisible, the metric will not produce a column in the response, but can be
+     * used in `metricFilter`, `orderBys`, or a metric `expression`.
+     * 
+ * + * bool invisible = 3; + * + * @param value The invisible to set. + * @return This builder for chaining. + */ + public Builder setInvisible(boolean value) { + + invisible_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Indicates if a metric is invisible in the report response. If a metric is
+     * invisible, the metric will not produce a column in the response, but can be
+     * used in `metricFilter`, `orderBys`, or a metric `expression`.
+     * 
+ * + * bool invisible = 3; + * + * @return This builder for chaining. + */ + public Builder clearInvisible() { + + invisible_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Metric) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Metric) + private static final com.google.analytics.data.v1beta.Metric DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Metric(); + } + + public static com.google.analytics.data.v1beta.Metric getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metric parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Metric(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Metric getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricAggregation.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricAggregation.java new file mode 100644 index 00000000..2900a72c --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricAggregation.java @@ -0,0 +1,222 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Represents aggregation of metrics.
+ * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.MetricAggregation} + */ +public enum MetricAggregation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified operator.
+   * 
+ * + * METRIC_AGGREGATION_UNSPECIFIED = 0; + */ + METRIC_AGGREGATION_UNSPECIFIED(0), + /** + * + * + *
+   * SUM operator.
+   * 
+ * + * TOTAL = 1; + */ + TOTAL(1), + /** + * + * + *
+   * Minimum operator.
+   * 
+ * + * MINIMUM = 5; + */ + MINIMUM(5), + /** + * + * + *
+   * Maximum operator.
+   * 
+ * + * MAXIMUM = 6; + */ + MAXIMUM(6), + /** + * + * + *
+   * Count operator.
+   * 
+ * + * COUNT = 4; + */ + COUNT(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified operator.
+   * 
+ * + * METRIC_AGGREGATION_UNSPECIFIED = 0; + */ + public static final int METRIC_AGGREGATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * SUM operator.
+   * 
+ * + * TOTAL = 1; + */ + public static final int TOTAL_VALUE = 1; + /** + * + * + *
+   * Minimum operator.
+   * 
+ * + * MINIMUM = 5; + */ + public static final int MINIMUM_VALUE = 5; + /** + * + * + *
+   * Maximum operator.
+   * 
+ * + * MAXIMUM = 6; + */ + public static final int MAXIMUM_VALUE = 6; + /** + * + * + *
+   * Count operator.
+   * 
+ * + * COUNT = 4; + */ + public static final int COUNT_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricAggregation valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricAggregation forNumber(int value) { + switch (value) { + case 0: + return METRIC_AGGREGATION_UNSPECIFIED; + case 1: + return TOTAL; + case 5: + return MINIMUM; + case 6: + return MAXIMUM; + case 4: + return COUNT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricAggregation findValueByNumber(int number) { + return MetricAggregation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto.getDescriptor().getEnumTypes().get(0); + } + + private static final MetricAggregation[] VALUES = values(); + + public static MetricAggregation valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricAggregation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.MetricAggregation) +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeader.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeader.java new file mode 100644 index 00000000..a8feaad4 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeader.java @@ -0,0 +1,790 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricHeader} + */ +public final class MetricHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.MetricHeader) + MetricHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricHeader.newBuilder() to construct. + private MetricHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricHeader() { + name_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricHeader(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MetricHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricHeader.class, + com.google.analytics.data.v1beta.MetricHeader.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The metric's name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The metric's name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * + * + *
+   * The metric's data type.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The metric's data type.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricType result = + com.google.analytics.data.v1beta.MetricType.valueOf(type_); + return result == null ? com.google.analytics.data.v1beta.MetricType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ != com.google.analytics.data.v1beta.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ != com.google.analytics.data.v1beta.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.MetricHeader)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.MetricHeader other = + (com.google.analytics.data.v1beta.MetricHeader) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.MetricHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.MetricHeader) + com.google.analytics.data.v1beta.MetricHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricHeader.class, + com.google.analytics.data.v1beta.MetricHeader.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.MetricHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricHeader_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader build() { + com.google.analytics.data.v1beta.MetricHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader buildPartial() { + com.google.analytics.data.v1beta.MetricHeader result = + new com.google.analytics.data.v1beta.MetricHeader(this); + result.name_ = name_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.MetricHeader) { + return mergeFrom((com.google.analytics.data.v1beta.MetricHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.MetricHeader other) { + if (other == com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.MetricHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.MetricHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The metric's name.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The metric's name.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The metric's name.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The metric's name.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The metric's name.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The metric's data type.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The metric's data type.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The metric's data type.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricType result = + com.google.analytics.data.v1beta.MetricType.valueOf(type_); + return result == null ? com.google.analytics.data.v1beta.MetricType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The metric's data type.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.analytics.data.v1beta.MetricType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The metric's data type.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.MetricHeader) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.MetricHeader) + private static final com.google.analytics.data.v1beta.MetricHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.MetricHeader(); + } + + public static com.google.analytics.data.v1beta.MetricHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetricHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeaderOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeaderOrBuilder.java new file mode 100644 index 00000000..4c4e6ad3 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeaderOrBuilder.java @@ -0,0 +1,75 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface MetricHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.MetricHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The metric's name.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The metric's name.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The metric's data type.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The metric's data type.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 2; + * + * @return The type. + */ + com.google.analytics.data.v1beta.MetricType getType(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadata.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadata.java new file mode 100644 index 00000000..34cf0483 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadata.java @@ -0,0 +1,1759 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Explains a metric.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricMetadata} + */ +public final class MetricMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.MetricMetadata) + MetricMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricMetadata.newBuilder() to construct. + private MetricMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricMetadata() { + apiName_ = ""; + uiName_ = ""; + description_ = ""; + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + type_ = 0; + expression_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MetricMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + apiName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + uiName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deprecatedApiNames_.add(s); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + expression_ = s; + break; + } + case 56: + { + customDefinition_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = deprecatedApiNames_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricMetadata.class, + com.google.analytics.data.v1beta.MetricMetadata.Builder.class); + } + + public static final int API_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object apiName_; + /** + * + * + *
+   * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+   * `eventCount`.
+   * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + @java.lang.Override + public java.lang.String getApiName() { + java.lang.Object ref = apiName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiName_ = s; + return s; + } + } + /** + * + * + *
+   * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+   * `eventCount`.
+   * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiNameBytes() { + java.lang.Object ref = apiName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UI_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object uiName_; + /** + * + * + *
+   * This metric's name within the Google Analytics user interface. For example,
+   * `Event count`.
+   * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + @java.lang.Override + public java.lang.String getUiName() { + java.lang.Object ref = uiName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uiName_ = s; + return s; + } + } + /** + * + * + *
+   * This metric's name within the Google Analytics user interface. For example,
+   * `Event count`.
+   * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUiNameBytes() { + java.lang.Object ref = uiName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Description of how this metric is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Description of how this metric is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPRECATED_API_NAMES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList deprecatedApiNames_; + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + public com.google.protobuf.ProtocolStringList getDeprecatedApiNamesList() { + return deprecatedApiNames_; + } + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + public int getDeprecatedApiNamesCount() { + return deprecatedApiNames_.size(); + } + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + public java.lang.String getDeprecatedApiNames(int index) { + return deprecatedApiNames_.get(index); + } + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + public com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index) { + return deprecatedApiNames_.getByteString(index); + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_; + /** + * + * + *
+   * The type of this metric.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of this metric.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricType result = + com.google.analytics.data.v1beta.MetricType.valueOf(type_); + return result == null ? com.google.analytics.data.v1beta.MetricType.UNRECOGNIZED : result; + } + + public static final int EXPRESSION_FIELD_NUMBER = 6; + private volatile java.lang.Object expression_; + /** + * + * + *
+   * The mathematical expression for this derived metric. Can be used in
+   * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+   * are not expressions, and for non-expressions, this field is empty.
+   * 
+ * + * string expression = 6; + * + * @return The expression. + */ + @java.lang.Override + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } + } + /** + * + * + *
+   * The mathematical expression for this derived metric. Can be used in
+   * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+   * are not expressions, and for non-expressions, this field is empty.
+   * 
+ * + * string expression = 6; + * + * @return The bytes for expression. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOM_DEFINITION_FIELD_NUMBER = 7; + private boolean customDefinition_; + /** + * + * + *
+   * True if the metric is a custom metric for this property.
+   * 
+ * + * bool custom_definition = 7; + * + * @return The customDefinition. + */ + @java.lang.Override + public boolean getCustomDefinition() { + return customDefinition_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getApiNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, apiName_); + } + if (!getUiNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uiName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < deprecatedApiNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deprecatedApiNames_.getRaw(i)); + } + if (type_ != com.google.analytics.data.v1beta.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (!getExpressionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, expression_); + } + if (customDefinition_ != false) { + output.writeBool(7, customDefinition_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getApiNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, apiName_); + } + if (!getUiNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uiName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + { + int dataSize = 0; + for (int i = 0; i < deprecatedApiNames_.size(); i++) { + dataSize += computeStringSizeNoTag(deprecatedApiNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeprecatedApiNamesList().size(); + } + if (type_ != com.google.analytics.data.v1beta.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); + } + if (!getExpressionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, expression_); + } + if (customDefinition_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, customDefinition_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.MetricMetadata)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.MetricMetadata other = + (com.google.analytics.data.v1beta.MetricMetadata) obj; + + if (!getApiName().equals(other.getApiName())) return false; + if (!getUiName().equals(other.getUiName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDeprecatedApiNamesList().equals(other.getDeprecatedApiNamesList())) return false; + if (type_ != other.type_) return false; + if (!getExpression().equals(other.getExpression())) return false; + if (getCustomDefinition() != other.getCustomDefinition()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + API_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApiName().hashCode(); + hash = (37 * hash) + UI_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUiName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getDeprecatedApiNamesCount() > 0) { + hash = (37 * hash) + DEPRECATED_API_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getDeprecatedApiNamesList().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getExpression().hashCode(); + hash = (37 * hash) + CUSTOM_DEFINITION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCustomDefinition()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.MetricMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Explains a metric.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.MetricMetadata) + com.google.analytics.data.v1beta.MetricMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricMetadata.class, + com.google.analytics.data.v1beta.MetricMetadata.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.MetricMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + apiName_ = ""; + + uiName_ = ""; + + description_ = ""; + + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + + expression_ = ""; + + customDefinition_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadata getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.MetricMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadata build() { + com.google.analytics.data.v1beta.MetricMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadata buildPartial() { + com.google.analytics.data.v1beta.MetricMetadata result = + new com.google.analytics.data.v1beta.MetricMetadata(this); + int from_bitField0_ = bitField0_; + result.apiName_ = apiName_; + result.uiName_ = uiName_; + result.description_ = description_; + if (((bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = deprecatedApiNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deprecatedApiNames_ = deprecatedApiNames_; + result.type_ = type_; + result.expression_ = expression_; + result.customDefinition_ = customDefinition_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.MetricMetadata) { + return mergeFrom((com.google.analytics.data.v1beta.MetricMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.MetricMetadata other) { + if (other == com.google.analytics.data.v1beta.MetricMetadata.getDefaultInstance()) + return this; + if (!other.getApiName().isEmpty()) { + apiName_ = other.apiName_; + onChanged(); + } + if (!other.getUiName().isEmpty()) { + uiName_ = other.uiName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.deprecatedApiNames_.isEmpty()) { + if (deprecatedApiNames_.isEmpty()) { + deprecatedApiNames_ = other.deprecatedApiNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.addAll(other.deprecatedApiNames_); + } + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getExpression().isEmpty()) { + expression_ = other.expression_; + onChanged(); + } + if (other.getCustomDefinition() != false) { + setCustomDefinition(other.getCustomDefinition()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.MetricMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.MetricMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object apiName_ = ""; + /** + * + * + *
+     * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+     * `eventCount`.
+     * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + public java.lang.String getApiName() { + java.lang.Object ref = apiName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+     * `eventCount`.
+     * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + public com.google.protobuf.ByteString getApiNameBytes() { + java.lang.Object ref = apiName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+     * `eventCount`.
+     * 
+ * + * string api_name = 1; + * + * @param value The apiName to set. + * @return This builder for chaining. + */ + public Builder setApiName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + apiName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+     * `eventCount`.
+     * 
+ * + * string api_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearApiName() { + + apiName_ = getDefaultInstance().getApiName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+     * `eventCount`.
+     * 
+ * + * string api_name = 1; + * + * @param value The bytes for apiName to set. + * @return This builder for chaining. + */ + public Builder setApiNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + apiName_ = value; + onChanged(); + return this; + } + + private java.lang.Object uiName_ = ""; + /** + * + * + *
+     * This metric's name within the Google Analytics user interface. For example,
+     * `Event count`.
+     * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + public java.lang.String getUiName() { + java.lang.Object ref = uiName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uiName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This metric's name within the Google Analytics user interface. For example,
+     * `Event count`.
+     * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + public com.google.protobuf.ByteString getUiNameBytes() { + java.lang.Object ref = uiName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uiName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This metric's name within the Google Analytics user interface. For example,
+     * `Event count`.
+     * 
+ * + * string ui_name = 2; + * + * @param value The uiName to set. + * @return This builder for chaining. + */ + public Builder setUiName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uiName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This metric's name within the Google Analytics user interface. For example,
+     * `Event count`.
+     * 
+ * + * string ui_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearUiName() { + + uiName_ = getDefaultInstance().getUiName(); + onChanged(); + return this; + } + /** + * + * + *
+     * This metric's name within the Google Analytics user interface. For example,
+     * `Event count`.
+     * 
+ * + * string ui_name = 2; + * + * @param value The bytes for uiName to set. + * @return This builder for chaining. + */ + public Builder setUiNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uiName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Description of how this metric is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Description of how this metric is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Description of how this metric is used and calculated.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Description of how this metric is used and calculated.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Description of how this metric is used and calculated.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList deprecatedApiNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDeprecatedApiNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deprecatedApiNames_ = new com.google.protobuf.LazyStringArrayList(deprecatedApiNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + public com.google.protobuf.ProtocolStringList getDeprecatedApiNamesList() { + return deprecatedApiNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + public int getDeprecatedApiNamesCount() { + return deprecatedApiNames_.size(); + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + public java.lang.String getDeprecatedApiNames(int index) { + return deprecatedApiNames_.get(index); + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + public com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index) { + return deprecatedApiNames_.getByteString(index); + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index to set the value at. + * @param value The deprecatedApiNames to set. + * @return This builder for chaining. + */ + public Builder setDeprecatedApiNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param value The deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addDeprecatedApiNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param values The deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addAllDeprecatedApiNames(java.lang.Iterable values) { + ensureDeprecatedApiNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deprecatedApiNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return This builder for chaining. + */ + public Builder clearDeprecatedApiNames() { + deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Still usable but deprecated names for this metric. If populated, this
+     * metric is available by either `apiName` or one of `deprecatedApiNames`
+     * for a period of time. After the deprecation period, the metric will be
+     * available only by `apiName`.
+     * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param value The bytes of the deprecatedApiNames to add. + * @return This builder for chaining. + */ + public Builder addDeprecatedApiNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeprecatedApiNamesIsMutable(); + deprecatedApiNames_.add(value); + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * The type of this metric.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of this metric.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this metric.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricType getType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricType result = + com.google.analytics.data.v1beta.MetricType.valueOf(type_); + return result == null ? com.google.analytics.data.v1beta.MetricType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The type of this metric.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.analytics.data.v1beta.MetricType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of this metric.
+     * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object expression_ = ""; + /** + * + * + *
+     * The mathematical expression for this derived metric. Can be used in
+     * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+     * are not expressions, and for non-expressions, this field is empty.
+     * 
+ * + * string expression = 6; + * + * @return The expression. + */ + public java.lang.String getExpression() { + java.lang.Object ref = expression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expression_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The mathematical expression for this derived metric. Can be used in
+     * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+     * are not expressions, and for non-expressions, this field is empty.
+     * 
+ * + * string expression = 6; + * + * @return The bytes for expression. + */ + public com.google.protobuf.ByteString getExpressionBytes() { + java.lang.Object ref = expression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + expression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The mathematical expression for this derived metric. Can be used in
+     * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+     * are not expressions, and for non-expressions, this field is empty.
+     * 
+ * + * string expression = 6; + * + * @param value The expression to set. + * @return This builder for chaining. + */ + public Builder setExpression(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + expression_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The mathematical expression for this derived metric. Can be used in
+     * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+     * are not expressions, and for non-expressions, this field is empty.
+     * 
+ * + * string expression = 6; + * + * @return This builder for chaining. + */ + public Builder clearExpression() { + + expression_ = getDefaultInstance().getExpression(); + onChanged(); + return this; + } + /** + * + * + *
+     * The mathematical expression for this derived metric. Can be used in
+     * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+     * are not expressions, and for non-expressions, this field is empty.
+     * 
+ * + * string expression = 6; + * + * @param value The bytes for expression to set. + * @return This builder for chaining. + */ + public Builder setExpressionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + expression_ = value; + onChanged(); + return this; + } + + private boolean customDefinition_; + /** + * + * + *
+     * True if the metric is a custom metric for this property.
+     * 
+ * + * bool custom_definition = 7; + * + * @return The customDefinition. + */ + @java.lang.Override + public boolean getCustomDefinition() { + return customDefinition_; + } + /** + * + * + *
+     * True if the metric is a custom metric for this property.
+     * 
+ * + * bool custom_definition = 7; + * + * @param value The customDefinition to set. + * @return This builder for chaining. + */ + public Builder setCustomDefinition(boolean value) { + + customDefinition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if the metric is a custom metric for this property.
+     * 
+ * + * bool custom_definition = 7; + * + * @return This builder for chaining. + */ + public Builder clearCustomDefinition() { + + customDefinition_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.MetricMetadata) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.MetricMetadata) + private static final com.google.analytics.data.v1beta.MetricMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.MetricMetadata(); + } + + public static com.google.analytics.data.v1beta.MetricMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetricMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadataOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadataOrBuilder.java new file mode 100644 index 00000000..83bc4604 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadataOrBuilder.java @@ -0,0 +1,234 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface MetricMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.MetricMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+   * `eventCount`.
+   * 
+ * + * string api_name = 1; + * + * @return The apiName. + */ + java.lang.String getApiName(); + /** + * + * + *
+   * A metric name. Useable in [Metric](#Metric)'s `name`. For example,
+   * `eventCount`.
+   * 
+ * + * string api_name = 1; + * + * @return The bytes for apiName. + */ + com.google.protobuf.ByteString getApiNameBytes(); + + /** + * + * + *
+   * This metric's name within the Google Analytics user interface. For example,
+   * `Event count`.
+   * 
+ * + * string ui_name = 2; + * + * @return The uiName. + */ + java.lang.String getUiName(); + /** + * + * + *
+   * This metric's name within the Google Analytics user interface. For example,
+   * `Event count`.
+   * 
+ * + * string ui_name = 2; + * + * @return The bytes for uiName. + */ + com.google.protobuf.ByteString getUiNameBytes(); + + /** + * + * + *
+   * Description of how this metric is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Description of how this metric is used and calculated.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return A list containing the deprecatedApiNames. + */ + java.util.List getDeprecatedApiNamesList(); + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @return The count of deprecatedApiNames. + */ + int getDeprecatedApiNamesCount(); + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the element to return. + * @return The deprecatedApiNames at the given index. + */ + java.lang.String getDeprecatedApiNames(int index); + /** + * + * + *
+   * Still usable but deprecated names for this metric. If populated, this
+   * metric is available by either `apiName` or one of `deprecatedApiNames`
+   * for a period of time. After the deprecation period, the metric will be
+   * available only by `apiName`.
+   * 
+ * + * repeated string deprecated_api_names = 4; + * + * @param index The index of the value to return. + * @return The bytes of the deprecatedApiNames at the given index. + */ + com.google.protobuf.ByteString getDeprecatedApiNamesBytes(int index); + + /** + * + * + *
+   * The type of this metric.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * The type of this metric.
+   * 
+ * + * .google.analytics.data.v1beta.MetricType type = 5; + * + * @return The type. + */ + com.google.analytics.data.v1beta.MetricType getType(); + + /** + * + * + *
+   * The mathematical expression for this derived metric. Can be used in
+   * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+   * are not expressions, and for non-expressions, this field is empty.
+   * 
+ * + * string expression = 6; + * + * @return The expression. + */ + java.lang.String getExpression(); + /** + * + * + *
+   * The mathematical expression for this derived metric. Can be used in
+   * [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics
+   * are not expressions, and for non-expressions, this field is empty.
+   * 
+ * + * string expression = 6; + * + * @return The bytes for expression. + */ + com.google.protobuf.ByteString getExpressionBytes(); + + /** + * + * + *
+   * True if the metric is a custom metric for this property.
+   * 
+ * + * bool custom_definition = 7; + * + * @return The customDefinition. + */ + boolean getCustomDefinition(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricOrBuilder.java new file mode 100644 index 00000000..e8e2749a --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface MetricOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Metric) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the metric. See the [API
+   * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+   * for the list of metric names.
+   * If `expression` is specified, `name` can be any string that you would like
+   * within the allowed character set. For example if `expression` is
+   * `screenPageViews/sessions`, you could call that metric's name =
+   * `viewsPerSession`. Metric names that you choose must match the regular
+   * expression "^[a-zA-Z0-9_]$".
+   * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+   * `expression`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The name of the metric. See the [API
+   * Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics)
+   * for the list of metric names.
+   * If `expression` is specified, `name` can be any string that you would like
+   * within the allowed character set. For example if `expression` is
+   * `screenPageViews/sessions`, you could call that metric's name =
+   * `viewsPerSession`. Metric names that you choose must match the regular
+   * expression "^[a-zA-Z0-9_]$".
+   * Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric
+   * `expression`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A mathematical expression for derived metrics. For example, the metric
+   * Event count per user is `eventCount/totalUsers`.
+   * 
+ * + * string expression = 2; + * + * @return The expression. + */ + java.lang.String getExpression(); + /** + * + * + *
+   * A mathematical expression for derived metrics. For example, the metric
+   * Event count per user is `eventCount/totalUsers`.
+   * 
+ * + * string expression = 2; + * + * @return The bytes for expression. + */ + com.google.protobuf.ByteString getExpressionBytes(); + + /** + * + * + *
+   * Indicates if a metric is invisible in the report response. If a metric is
+   * invisible, the metric will not produce a column in the response, but can be
+   * used in `metricFilter`, `orderBys`, or a metric `expression`.
+   * 
+ * + * bool invisible = 3; + * + * @return The invisible. + */ + boolean getInvisible(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricType.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricType.java new file mode 100644 index 00000000..2d73d42b --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricType.java @@ -0,0 +1,396 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * A metric's value type.
+ * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.MetricType} + */ +public enum MetricType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified type.
+   * 
+ * + * METRIC_TYPE_UNSPECIFIED = 0; + */ + METRIC_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Integer type.
+   * 
+ * + * TYPE_INTEGER = 1; + */ + TYPE_INTEGER(1), + /** + * + * + *
+   * Floating point type.
+   * 
+ * + * TYPE_FLOAT = 2; + */ + TYPE_FLOAT(2), + /** + * + * + *
+   * A duration of seconds; a special floating point type.
+   * 
+ * + * TYPE_SECONDS = 4; + */ + TYPE_SECONDS(4), + /** + * + * + *
+   * A duration in milliseconds; a special floating point type.
+   * 
+ * + * TYPE_MILLISECONDS = 5; + */ + TYPE_MILLISECONDS(5), + /** + * + * + *
+   * A duration in minutes; a special floating point type.
+   * 
+ * + * TYPE_MINUTES = 6; + */ + TYPE_MINUTES(6), + /** + * + * + *
+   * A duration in hours; a special floating point type.
+   * 
+ * + * TYPE_HOURS = 7; + */ + TYPE_HOURS(7), + /** + * + * + *
+   * A custom metric of standard type; a special floating point type.
+   * 
+ * + * TYPE_STANDARD = 8; + */ + TYPE_STANDARD(8), + /** + * + * + *
+   * An amount of money; a special floating point type.
+   * 
+ * + * TYPE_CURRENCY = 9; + */ + TYPE_CURRENCY(9), + /** + * + * + *
+   * A length in feet; a special floating point type.
+   * 
+ * + * TYPE_FEET = 10; + */ + TYPE_FEET(10), + /** + * + * + *
+   * A length in miles; a special floating point type.
+   * 
+ * + * TYPE_MILES = 11; + */ + TYPE_MILES(11), + /** + * + * + *
+   * A length in meters; a special floating point type.
+   * 
+ * + * TYPE_METERS = 12; + */ + TYPE_METERS(12), + /** + * + * + *
+   * A length in kilometers; a special floating point type.
+   * 
+ * + * TYPE_KILOMETERS = 13; + */ + TYPE_KILOMETERS(13), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified type.
+   * 
+ * + * METRIC_TYPE_UNSPECIFIED = 0; + */ + public static final int METRIC_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Integer type.
+   * 
+ * + * TYPE_INTEGER = 1; + */ + public static final int TYPE_INTEGER_VALUE = 1; + /** + * + * + *
+   * Floating point type.
+   * 
+ * + * TYPE_FLOAT = 2; + */ + public static final int TYPE_FLOAT_VALUE = 2; + /** + * + * + *
+   * A duration of seconds; a special floating point type.
+   * 
+ * + * TYPE_SECONDS = 4; + */ + public static final int TYPE_SECONDS_VALUE = 4; + /** + * + * + *
+   * A duration in milliseconds; a special floating point type.
+   * 
+ * + * TYPE_MILLISECONDS = 5; + */ + public static final int TYPE_MILLISECONDS_VALUE = 5; + /** + * + * + *
+   * A duration in minutes; a special floating point type.
+   * 
+ * + * TYPE_MINUTES = 6; + */ + public static final int TYPE_MINUTES_VALUE = 6; + /** + * + * + *
+   * A duration in hours; a special floating point type.
+   * 
+ * + * TYPE_HOURS = 7; + */ + public static final int TYPE_HOURS_VALUE = 7; + /** + * + * + *
+   * A custom metric of standard type; a special floating point type.
+   * 
+ * + * TYPE_STANDARD = 8; + */ + public static final int TYPE_STANDARD_VALUE = 8; + /** + * + * + *
+   * An amount of money; a special floating point type.
+   * 
+ * + * TYPE_CURRENCY = 9; + */ + public static final int TYPE_CURRENCY_VALUE = 9; + /** + * + * + *
+   * A length in feet; a special floating point type.
+   * 
+ * + * TYPE_FEET = 10; + */ + public static final int TYPE_FEET_VALUE = 10; + /** + * + * + *
+   * A length in miles; a special floating point type.
+   * 
+ * + * TYPE_MILES = 11; + */ + public static final int TYPE_MILES_VALUE = 11; + /** + * + * + *
+   * A length in meters; a special floating point type.
+   * 
+ * + * TYPE_METERS = 12; + */ + public static final int TYPE_METERS_VALUE = 12; + /** + * + * + *
+   * A length in kilometers; a special floating point type.
+   * 
+ * + * TYPE_KILOMETERS = 13; + */ + public static final int TYPE_KILOMETERS_VALUE = 13; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MetricType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MetricType forNumber(int value) { + switch (value) { + case 0: + return METRIC_TYPE_UNSPECIFIED; + case 1: + return TYPE_INTEGER; + case 2: + return TYPE_FLOAT; + case 4: + return TYPE_SECONDS; + case 5: + return TYPE_MILLISECONDS; + case 6: + return TYPE_MINUTES; + case 7: + return TYPE_HOURS; + case 8: + return TYPE_STANDARD; + case 9: + return TYPE_CURRENCY; + case 10: + return TYPE_FEET; + case 11: + return TYPE_MILES; + case 12: + return TYPE_METERS; + case 13: + return TYPE_KILOMETERS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetricType findValueByNumber(int number) { + return MetricType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto.getDescriptor().getEnumTypes().get(1); + } + + private static final MetricType[] VALUES = values(); + + public static MetricType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MetricType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.MetricType) +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValue.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValue.java new file mode 100644 index 00000000..16e4a756 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValue.java @@ -0,0 +1,735 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The value of a metric.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricValue} + */ +public final class MetricValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.MetricValue) + MetricValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricValue.newBuilder() to construct. + private MetricValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MetricValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + oneValueCase_ = 4; + oneValue_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricValue.class, + com.google.analytics.data.v1beta.MetricValue.Builder.class); + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public enum OneValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + VALUE(4), + ONEVALUE_NOT_SET(0); + private final int value; + + private OneValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneValueCase valueOf(int value) { + return forNumber(value); + } + + public static OneValueCase forNumber(int value) { + switch (value) { + case 4: + return VALUE; + case 0: + return ONEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public static final int VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Measurement value. See MetricHeader for type.
+   * 
+ * + * string value = 4; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (oneValueCase_ == 4) { + ref = oneValue_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneValueCase_ == 4) { + oneValue_ = s; + } + return s; + } + } + /** + * + * + *
+   * Measurement value. See MetricHeader for type.
+   * 
+ * + * string value = 4; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (oneValueCase_ == 4) { + ref = oneValue_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneValueCase_ == 4) { + oneValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oneValueCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, oneValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneValueCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, oneValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.MetricValue)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.MetricValue other = + (com.google.analytics.data.v1beta.MetricValue) obj; + + if (!getOneValueCase().equals(other.getOneValueCase())) return false; + switch (oneValueCase_) { + case 4: + if (!getValue().equals(other.getValue())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (oneValueCase_) { + case 4: + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.MetricValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.MetricValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The value of a metric.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.MetricValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.MetricValue) + com.google.analytics.data.v1beta.MetricValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.MetricValue.class, + com.google.analytics.data.v1beta.MetricValue.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.MetricValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + oneValueCase_ = 0; + oneValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_MetricValue_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValue getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.MetricValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValue build() { + com.google.analytics.data.v1beta.MetricValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValue buildPartial() { + com.google.analytics.data.v1beta.MetricValue result = + new com.google.analytics.data.v1beta.MetricValue(this); + if (oneValueCase_ == 4) { + result.oneValue_ = oneValue_; + } + result.oneValueCase_ = oneValueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.MetricValue) { + return mergeFrom((com.google.analytics.data.v1beta.MetricValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.MetricValue other) { + if (other == com.google.analytics.data.v1beta.MetricValue.getDefaultInstance()) return this; + switch (other.getOneValueCase()) { + case VALUE: + { + oneValueCase_ = 4; + oneValue_ = other.oneValue_; + onChanged(); + break; + } + case ONEVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.MetricValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.MetricValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public Builder clearOneValue() { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Measurement value. See MetricHeader for type.
+     * 
+ * + * string value = 4; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = ""; + if (oneValueCase_ == 4) { + ref = oneValue_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneValueCase_ == 4) { + oneValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Measurement value. See MetricHeader for type.
+     * 
+ * + * string value = 4; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = ""; + if (oneValueCase_ == 4) { + ref = oneValue_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneValueCase_ == 4) { + oneValue_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Measurement value. See MetricHeader for type.
+     * 
+ * + * string value = 4; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneValueCase_ = 4; + oneValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Measurement value. See MetricHeader for type.
+     * 
+ * + * string value = 4; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + if (oneValueCase_ == 4) { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Measurement value. See MetricHeader for type.
+     * 
+ * + * string value = 4; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneValueCase_ = 4; + oneValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.MetricValue) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.MetricValue) + private static final com.google.analytics.data.v1beta.MetricValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.MetricValue(); + } + + public static com.google.analytics.data.v1beta.MetricValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetricValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValueOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValueOrBuilder.java new file mode 100644 index 00000000..d48667e9 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValueOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface MetricValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.MetricValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Measurement value. See MetricHeader for type.
+   * 
+ * + * string value = 4; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+   * Measurement value. See MetricHeader for type.
+   * 
+ * + * string value = 4; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + public com.google.analytics.data.v1beta.MetricValue.OneValueCase getOneValueCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValue.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValue.java new file mode 100644 index 00000000..ce8fc48b --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValue.java @@ -0,0 +1,745 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * To represent a number.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.NumericValue} + */ +public final class NumericValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.NumericValue) + NumericValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use NumericValue.newBuilder() to construct. + private NumericValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NumericValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NumericValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NumericValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + oneValueCase_ = 1; + oneValue_ = input.readInt64(); + break; + } + case 17: + { + oneValueCase_ = 2; + oneValue_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_NumericValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_NumericValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.NumericValue.class, + com.google.analytics.data.v1beta.NumericValue.Builder.class); + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public enum OneValueCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INT64_VALUE(1), + DOUBLE_VALUE(2), + ONEVALUE_NOT_SET(0); + private final int value; + + private OneValueCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneValueCase valueOf(int value) { + return forNumber(value); + } + + public static OneValueCase forNumber(int value) { + switch (value) { + case 1: + return INT64_VALUE; + case 2: + return DOUBLE_VALUE; + case 0: + return ONEVALUE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public static final int INT64_VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Integer value
+   * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + @java.lang.Override + public long getInt64Value() { + if (oneValueCase_ == 1) { + return (java.lang.Long) oneValue_; + } + return 0L; + } + + public static final int DOUBLE_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Double value
+   * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + if (oneValueCase_ == 2) { + return (java.lang.Double) oneValue_; + } + return 0D; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oneValueCase_ == 1) { + output.writeInt64(1, (long) ((java.lang.Long) oneValue_)); + } + if (oneValueCase_ == 2) { + output.writeDouble(2, (double) ((java.lang.Double) oneValue_)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneValueCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 1, (long) ((java.lang.Long) oneValue_)); + } + if (oneValueCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, (double) ((java.lang.Double) oneValue_)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.NumericValue)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.NumericValue other = + (com.google.analytics.data.v1beta.NumericValue) obj; + + if (!getOneValueCase().equals(other.getOneValueCase())) return false; + switch (oneValueCase_) { + case 1: + if (getInt64Value() != other.getInt64Value()) return false; + break; + case 2: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (oneValueCase_) { + case 1: + hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInt64Value()); + break; + case 2: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.NumericValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.NumericValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.NumericValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.NumericValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * To represent a number.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.NumericValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.NumericValue) + com.google.analytics.data.v1beta.NumericValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_NumericValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_NumericValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.NumericValue.class, + com.google.analytics.data.v1beta.NumericValue.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.NumericValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + oneValueCase_ = 0; + oneValue_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_NumericValue_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.NumericValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue build() { + com.google.analytics.data.v1beta.NumericValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue buildPartial() { + com.google.analytics.data.v1beta.NumericValue result = + new com.google.analytics.data.v1beta.NumericValue(this); + if (oneValueCase_ == 1) { + result.oneValue_ = oneValue_; + } + if (oneValueCase_ == 2) { + result.oneValue_ = oneValue_; + } + result.oneValueCase_ = oneValueCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.NumericValue) { + return mergeFrom((com.google.analytics.data.v1beta.NumericValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.NumericValue other) { + if (other == com.google.analytics.data.v1beta.NumericValue.getDefaultInstance()) return this; + switch (other.getOneValueCase()) { + case INT64_VALUE: + { + setInt64Value(other.getInt64Value()); + break; + } + case DOUBLE_VALUE: + { + setDoubleValue(other.getDoubleValue()); + break; + } + case ONEVALUE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.NumericValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.NumericValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneValueCase_ = 0; + private java.lang.Object oneValue_; + + public OneValueCase getOneValueCase() { + return OneValueCase.forNumber(oneValueCase_); + } + + public Builder clearOneValue() { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Integer value
+     * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + public long getInt64Value() { + if (oneValueCase_ == 1) { + return (java.lang.Long) oneValue_; + } + return 0L; + } + /** + * + * + *
+     * Integer value
+     * 
+ * + * int64 int64_value = 1; + * + * @param value The int64Value to set. + * @return This builder for chaining. + */ + public Builder setInt64Value(long value) { + oneValueCase_ = 1; + oneValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Integer value
+     * 
+ * + * int64 int64_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearInt64Value() { + if (oneValueCase_ == 1) { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Double value
+     * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (oneValueCase_ == 2) { + return (java.lang.Double) oneValue_; + } + return 0D; + } + /** + * + * + *
+     * Double value
+     * 
+ * + * double double_value = 2; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + oneValueCase_ = 2; + oneValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Double value
+     * 
+ * + * double double_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (oneValueCase_ == 2) { + oneValueCase_ = 0; + oneValue_ = null; + onChanged(); + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.NumericValue) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.NumericValue) + private static final com.google.analytics.data.v1beta.NumericValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.NumericValue(); + } + + public static com.google.analytics.data.v1beta.NumericValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NumericValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NumericValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.NumericValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValueOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValueOrBuilder.java new file mode 100644 index 00000000..531ff40d --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValueOrBuilder.java @@ -0,0 +1,53 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface NumericValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.NumericValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Integer value
+   * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + long getInt64Value(); + + /** + * + * + *
+   * Double value
+   * 
+ * + * double double_value = 2; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + public com.google.analytics.data.v1beta.NumericValue.OneValueCase getOneValueCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderBy.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderBy.java new file mode 100644 index 00000000..4a0c1f5a --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderBy.java @@ -0,0 +1,5533 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The sort options.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy} + */ +public final class OrderBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.OrderBy) + OrderByOrBuilder { + private static final long serialVersionUID = 0L; + // Use OrderBy.newBuilder() to construct. + private OrderBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OrderBy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OrderBy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OrderBy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder subBuilder = null; + if (oneOrderByCase_ == 1) { + subBuilder = + ((com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_) + .toBuilder(); + } + oneOrderBy_ = + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_); + oneOrderBy_ = subBuilder.buildPartial(); + } + oneOrderByCase_ = 1; + break; + } + case 18: + { + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder subBuilder = null; + if (oneOrderByCase_ == 2) { + subBuilder = + ((com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_) + .toBuilder(); + } + oneOrderBy_ = + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_); + oneOrderBy_ = subBuilder.buildPartial(); + } + oneOrderByCase_ = 2; + break; + } + case 26: + { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder subBuilder = null; + if (oneOrderByCase_ == 3) { + subBuilder = + ((com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_) + .toBuilder(); + } + oneOrderBy_ = + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_); + oneOrderBy_ = subBuilder.buildPartial(); + } + oneOrderByCase_ = 3; + break; + } + case 32: + { + desc_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.class, + com.google.analytics.data.v1beta.OrderBy.Builder.class); + } + + public interface MetricOrderByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.OrderBy.MetricOrderBy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A metric name in the request to order by.
+     * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + java.lang.String getMetricName(); + /** + * + * + *
+     * A metric name in the request to order by.
+     * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + com.google.protobuf.ByteString getMetricNameBytes(); + } + /** + * + * + *
+   * Sorts by metric values.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.MetricOrderBy} + */ + public static final class MetricOrderBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.OrderBy.MetricOrderBy) + MetricOrderByOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricOrderBy.newBuilder() to construct. + private MetricOrderBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricOrderBy() { + metricName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricOrderBy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MetricOrderBy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + metricName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder.class); + } + + public static final int METRIC_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object metricName_; + /** + * + * + *
+     * A metric name in the request to order by.
+     * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + @java.lang.Override + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricName_ = s; + return s; + } + } + /** + * + * + *
+     * A metric name in the request to order by.
+     * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMetricNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMetricNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.OrderBy.MetricOrderBy)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy other = + (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) obj; + + if (!getMetricName().equals(other.getMetricName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METRIC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMetricName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Sorts by metric values.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.MetricOrderBy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.OrderBy.MetricOrderBy) + com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + metricName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy build() { + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy buildPartial() { + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy result = + new com.google.analytics.data.v1beta.OrderBy.MetricOrderBy(this); + result.metricName_ = metricName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) { + return mergeFrom((com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.OrderBy.MetricOrderBy other) { + if (other == com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance()) + return this; + if (!other.getMetricName().isEmpty()) { + metricName_ = other.metricName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object metricName_ = ""; + /** + * + * + *
+       * A metric name in the request to order by.
+       * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A metric name in the request to order by.
+       * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A metric name in the request to order by.
+       * 
+ * + * string metric_name = 1; + * + * @param value The metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A metric name in the request to order by.
+       * 
+ * + * string metric_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearMetricName() { + + metricName_ = getDefaultInstance().getMetricName(); + onChanged(); + return this; + } + /** + * + * + *
+       * A metric name in the request to order by.
+       * 
+ * + * string metric_name = 1; + * + * @param value The bytes for metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.OrderBy.MetricOrderBy) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.OrderBy.MetricOrderBy) + private static final com.google.analytics.data.v1beta.OrderBy.MetricOrderBy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.OrderBy.MetricOrderBy(); + } + + public static com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricOrderBy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MetricOrderBy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DimensionOrderByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A dimension name in the request to order by.
+     * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + java.lang.String getDimensionName(); + /** + * + * + *
+     * A dimension name in the request to order by.
+     * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + com.google.protobuf.ByteString getDimensionNameBytes(); + + /** + * + * + *
+     * Controls the rule for dimension value ordering.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * @return The enum numeric value on the wire for orderType. + */ + int getOrderTypeValue(); + /** + * + * + *
+     * Controls the rule for dimension value ordering.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * @return The orderType. + */ + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType getOrderType(); + } + /** + * + * + *
+   * Sorts by dimension values.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.DimensionOrderBy} + */ + public static final class DimensionOrderBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + DimensionOrderByOrBuilder { + private static final long serialVersionUID = 0L; + // Use DimensionOrderBy.newBuilder() to construct. + private DimensionOrderBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DimensionOrderBy() { + dimensionName_ = ""; + orderType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DimensionOrderBy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DimensionOrderBy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dimensionName_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + orderType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder.class); + } + + /** + * + * + *
+     * Rule to order the string dimension values by.
+     * 
+ * + * Protobuf enum {@code google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType} + */ + public enum OrderType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * ORDER_TYPE_UNSPECIFIED = 0; + */ + ORDER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
+       * "b" < "z".
+       * 
+ * + * ALPHANUMERIC = 1; + */ + ALPHANUMERIC(1), + /** + * + * + *
+       * Case insensitive alphanumeric sort by lower case Unicode code point.
+       * For example, "2" < "A" < "b" < "X" < "z".
+       * 
+ * + * CASE_INSENSITIVE_ALPHANUMERIC = 2; + */ + 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; + */ + NUMERIC(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * ORDER_TYPE_UNSPECIFIED = 0; + */ + public static final int ORDER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" <
+       * "b" < "z".
+       * 
+ * + * ALPHANUMERIC = 1; + */ + public static final int ALPHANUMERIC_VALUE = 1; + /** + * + * + *
+       * Case insensitive alphanumeric sort by lower case Unicode code point.
+       * For example, "2" < "A" < "b" < "X" < "z".
+       * 
+ * + * CASE_INSENSITIVE_ALPHANUMERIC = 2; + */ + public static final int CASE_INSENSITIVE_ALPHANUMERIC_VALUE = 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; + */ + public static final int NUMERIC_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OrderType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OrderType forNumber(int value) { + switch (value) { + case 0: + return ORDER_TYPE_UNSPECIFIED; + case 1: + return ALPHANUMERIC; + case 2: + return CASE_INSENSITIVE_ALPHANUMERIC; + case 3: + return NUMERIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OrderType findValueByNumber(int number) { + return OrderType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OrderType[] VALUES = values(); + + public static OrderType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OrderType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType) + } + + public static final int DIMENSION_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object dimensionName_; + /** + * + * + *
+     * A dimension name in the request to order by.
+     * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + @java.lang.Override + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } + } + /** + * + * + *
+     * A dimension name in the request to order by.
+     * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_TYPE_FIELD_NUMBER = 2; + private int orderType_; + /** + * + * + *
+     * Controls the rule for dimension value ordering.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * @return The enum numeric value on the wire for orderType. + */ + @java.lang.Override + public int getOrderTypeValue() { + return orderType_; + } + /** + * + * + *
+     * Controls the rule for dimension value ordering.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * @return The orderType. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType getOrderType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType result = + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType.valueOf(orderType_); + return result == null + ? com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDimensionNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dimensionName_); + } + if (orderType_ + != com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType + .ORDER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, orderType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDimensionNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dimensionName_); + } + if (orderType_ + != com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType + .ORDER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, orderType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy other = + (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) obj; + + if (!getDimensionName().equals(other.getDimensionName())) return false; + if (orderType_ != other.orderType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DIMENSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDimensionName().hashCode(); + hash = (37 * hash) + ORDER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + orderType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Sorts by dimension values.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.DimensionOrderBy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dimensionName_ = ""; + + orderType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy build() { + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy buildPartial() { + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy result = + new com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(this); + result.dimensionName_ = dimensionName_; + result.orderType_ = orderType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) { + return mergeFrom((com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy other) { + if (other == com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance()) + return this; + if (!other.getDimensionName().isEmpty()) { + dimensionName_ = other.dimensionName_; + onChanged(); + } + if (other.orderType_ != 0) { + setOrderTypeValue(other.getOrderTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dimensionName_ = ""; + /** + * + * + *
+       * A dimension name in the request to order by.
+       * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A dimension name in the request to order by.
+       * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A dimension name in the request to order by.
+       * 
+ * + * string dimension_name = 1; + * + * @param value The dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimensionName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A dimension name in the request to order by.
+       * 
+ * + * string dimension_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDimensionName() { + + dimensionName_ = getDefaultInstance().getDimensionName(); + onChanged(); + return this; + } + /** + * + * + *
+       * A dimension name in the request to order by.
+       * 
+ * + * string dimension_name = 1; + * + * @param value The bytes for dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimensionName_ = value; + onChanged(); + return this; + } + + private int orderType_ = 0; + /** + * + * + *
+       * Controls the rule for dimension value ordering.
+       * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * + * @return The enum numeric value on the wire for orderType. + */ + @java.lang.Override + public int getOrderTypeValue() { + return orderType_; + } + /** + * + * + *
+       * Controls the rule for dimension value ordering.
+       * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * + * @param value The enum numeric value on the wire for orderType to set. + * @return This builder for chaining. + */ + public Builder setOrderTypeValue(int value) { + + orderType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Controls the rule for dimension value ordering.
+       * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * + * @return The orderType. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType getOrderType() { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType result = + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType.valueOf(orderType_); + return result == null + ? com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Controls the rule for dimension value ordering.
+       * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * + * @param value The orderType to set. + * @return This builder for chaining. + */ + public Builder setOrderType( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType value) { + if (value == null) { + throw new NullPointerException(); + } + + orderType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Controls the rule for dimension value ordering.
+       * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearOrderType() { + + orderType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.OrderBy.DimensionOrderBy) + private static final com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy(); + } + + public static com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DimensionOrderBy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DimensionOrderBy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PivotOrderByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.OrderBy.PivotOrderBy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * In the response to order by, order rows by this column. Must be a metric
+     * name from the request.
+     * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + java.lang.String getMetricName(); + /** + * + * + *
+     * In the response to order by, order rows by this column. Must be a metric
+     * name from the request.
+     * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + com.google.protobuf.ByteString getMetricNameBytes(); + + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + java.util.List + getPivotSelectionsList(); + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection getPivotSelections( + int index); + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + int getPivotSelectionsCount(); + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + java.util.List< + ? extends com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder> + getPivotSelectionsOrBuilderList(); + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder + getPivotSelectionsOrBuilder(int index); + } + /** + * + * + *
+   * Sorts by a pivot column group.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.PivotOrderBy} + */ + public static final class PivotOrderBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.OrderBy.PivotOrderBy) + PivotOrderByOrBuilder { + private static final long serialVersionUID = 0L; + // Use PivotOrderBy.newBuilder() to construct. + private PivotOrderBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PivotOrderBy() { + metricName_ = ""; + pivotSelections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PivotOrderBy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PivotOrderBy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + metricName_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pivotSelections_ = + new java.util.ArrayList< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection>(); + mutable_bitField0_ |= 0x00000001; + } + pivotSelections_.add( + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + .parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pivotSelections_ = java.util.Collections.unmodifiableList(pivotSelections_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder.class); + } + + public interface PivotSelectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Must be a dimension name from the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + java.lang.String getDimensionName(); + /** + * + * + *
+       * Must be a dimension name from the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + com.google.protobuf.ByteString getDimensionNameBytes(); + + /** + * + * + *
+       * Order by only when the named dimension is this value.
+       * 
+ * + * string dimension_value = 2; + * + * @return The dimensionValue. + */ + java.lang.String getDimensionValue(); + /** + * + * + *
+       * Order by only when the named dimension is this value.
+       * 
+ * + * string dimension_value = 2; + * + * @return The bytes for dimensionValue. + */ + com.google.protobuf.ByteString getDimensionValueBytes(); + } + /** + * + * + *
+     * A pair of dimension names and values. Rows with this dimension pivot pair
+     * are ordered by the metric's value.
+     * For example if pivots = {{"browser", "Chrome"}} and
+     * metric_name = "Sessions",
+     * then the rows will be sorted based on Sessions in Chrome.
+     *     ---------|----------|----------------|----------|----------------
+     *              |  Chrome  |    Chrome      |  Safari  |     Safari
+     *     ---------|----------|----------------|----------|----------------
+     *      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
+     *     ---------|----------|----------------|----------|----------------
+     *         US   |    2     |       2        |     3    |        1
+     *     ---------|----------|----------------|----------|----------------
+     *       Canada |    3     |       1        |     4    |        1
+     *     ---------|----------|----------------|----------|----------------
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} + */ + public static final class PivotSelection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + PivotSelectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PivotSelection.newBuilder() to construct. + private PivotSelection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PivotSelection() { + dimensionName_ = ""; + dimensionValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PivotSelection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PivotSelection( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dimensionName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + dimensionValue_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.class, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder.class); + } + + public static final int DIMENSION_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object dimensionName_; + /** + * + * + *
+       * Must be a dimension name from the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + @java.lang.Override + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } + } + /** + * + * + *
+       * Must be a dimension name from the request.
+       * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSION_VALUE_FIELD_NUMBER = 2; + private volatile java.lang.Object dimensionValue_; + /** + * + * + *
+       * Order by only when the named dimension is this value.
+       * 
+ * + * string dimension_value = 2; + * + * @return The dimensionValue. + */ + @java.lang.Override + public java.lang.String getDimensionValue() { + java.lang.Object ref = dimensionValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionValue_ = s; + return s; + } + } + /** + * + * + *
+       * Order by only when the named dimension is this value.
+       * 
+ * + * string dimension_value = 2; + * + * @return The bytes for dimensionValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDimensionValueBytes() { + java.lang.Object ref = dimensionValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDimensionNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dimensionName_); + } + if (!getDimensionValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dimensionValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDimensionNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dimensionName_); + } + if (!getDimensionValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dimensionValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection other = + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) obj; + + if (!getDimensionName().equals(other.getDimensionName())) return false; + if (!getDimensionValue().equals(other.getDimensionValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DIMENSION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDimensionName().hashCode(); + hash = (37 * hash) + DIMENSION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getDimensionValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A pair of dimension names and values. Rows with this dimension pivot pair
+       * are ordered by the metric's value.
+       * For example if pivots = {{"browser", "Chrome"}} and
+       * metric_name = "Sessions",
+       * then the rows will be sorted based on Sessions in Chrome.
+       *     ---------|----------|----------------|----------|----------------
+       *              |  Chrome  |    Chrome      |  Safari  |     Safari
+       *     ---------|----------|----------------|----------|----------------
+       *      Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions
+       *     ---------|----------|----------------|----------|----------------
+       *         US   |    2     |       2        |     3    |        1
+       *     ---------|----------|----------------|----------|----------------
+       *       Canada |    3     |       1        |     4    |        1
+       *     ---------|----------|----------------|----------|----------------
+       * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.class, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + .class); + } + + // Construct using + // com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dimensionName_ = ""; + + dimensionValue_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection build() { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection buildPartial() { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection result = + new com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(this); + result.dimensionName_ = dimensionName_; + result.dimensionValue_ = dimensionValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) { + return mergeFrom( + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection other) { + if (other + == com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + .getDefaultInstance()) return this; + if (!other.getDimensionName().isEmpty()) { + dimensionName_ = other.dimensionName_; + onChanged(); + } + if (!other.getDimensionValue().isEmpty()) { + dimensionValue_ = other.dimensionValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dimensionName_ = ""; + /** + * + * + *
+         * Must be a dimension name from the request.
+         * 
+ * + * string dimension_name = 1; + * + * @return The dimensionName. + */ + public java.lang.String getDimensionName() { + java.lang.Object ref = dimensionName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Must be a dimension name from the request.
+         * 
+ * + * string dimension_name = 1; + * + * @return The bytes for dimensionName. + */ + public com.google.protobuf.ByteString getDimensionNameBytes() { + java.lang.Object ref = dimensionName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Must be a dimension name from the request.
+         * 
+ * + * string dimension_name = 1; + * + * @param value The dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimensionName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Must be a dimension name from the request.
+         * 
+ * + * string dimension_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDimensionName() { + + dimensionName_ = getDefaultInstance().getDimensionName(); + onChanged(); + return this; + } + /** + * + * + *
+         * Must be a dimension name from the request.
+         * 
+ * + * string dimension_name = 1; + * + * @param value The bytes for dimensionName to set. + * @return This builder for chaining. + */ + public Builder setDimensionNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimensionName_ = value; + onChanged(); + return this; + } + + private java.lang.Object dimensionValue_ = ""; + /** + * + * + *
+         * Order by only when the named dimension is this value.
+         * 
+ * + * string dimension_value = 2; + * + * @return The dimensionValue. + */ + public java.lang.String getDimensionValue() { + java.lang.Object ref = dimensionValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dimensionValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Order by only when the named dimension is this value.
+         * 
+ * + * string dimension_value = 2; + * + * @return The bytes for dimensionValue. + */ + public com.google.protobuf.ByteString getDimensionValueBytes() { + java.lang.Object ref = dimensionValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dimensionValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Order by only when the named dimension is this value.
+         * 
+ * + * string dimension_value = 2; + * + * @param value The dimensionValue to set. + * @return This builder for chaining. + */ + public Builder setDimensionValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dimensionValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Order by only when the named dimension is this value.
+         * 
+ * + * string dimension_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearDimensionValue() { + + dimensionValue_ = getDefaultInstance().getDimensionValue(); + onChanged(); + return this; + } + /** + * + * + *
+         * Order by only when the named dimension is this value.
+         * 
+ * + * string dimension_value = 2; + * + * @param value The bytes for dimensionValue to set. + * @return This builder for chaining. + */ + public Builder setDimensionValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dimensionValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection) + private static final com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection(); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PivotSelection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PivotSelection(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int METRIC_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object metricName_; + /** + * + * + *
+     * In the response to order by, order rows by this column. Must be a metric
+     * name from the request.
+     * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + @java.lang.Override + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricName_ = s; + return s; + } + } + /** + * + * + *
+     * In the response to order by, order rows by this column. Must be a metric
+     * name from the request.
+     * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PIVOT_SELECTIONS_FIELD_NUMBER = 2; + private java.util.List + pivotSelections_; + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + @java.lang.Override + public java.util.List + getPivotSelectionsList() { + return pivotSelections_; + } + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder> + getPivotSelectionsOrBuilderList() { + return pivotSelections_; + } + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + @java.lang.Override + public int getPivotSelectionsCount() { + return pivotSelections_.size(); + } + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection getPivotSelections( + int index) { + return pivotSelections_.get(index); + } + /** + * + * + *
+     * Used to select a dimension name and value pivot. If multiple pivot
+     * selections are given, the sort occurs on rows where all pivot selection
+     * dimension name and value pairs match the row's dimension name and value
+     * pair.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder + getPivotSelectionsOrBuilder(int index) { + return pivotSelections_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMetricNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricName_); + } + for (int i = 0; i < pivotSelections_.size(); i++) { + output.writeMessage(2, pivotSelections_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMetricNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricName_); + } + for (int i = 0; i < pivotSelections_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, pivotSelections_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.OrderBy.PivotOrderBy)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy other = + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) obj; + + if (!getMetricName().equals(other.getMetricName())) return false; + if (!getPivotSelectionsList().equals(other.getPivotSelectionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METRIC_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMetricName().hashCode(); + if (getPivotSelectionsCount() > 0) { + hash = (37 * hash) + PIVOT_SELECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPivotSelectionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Sorts by a pivot column group.
+     * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy.PivotOrderBy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.OrderBy.PivotOrderBy) + com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.class, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPivotSelectionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + metricName_ = ""; + + if (pivotSelectionsBuilder_ == null) { + pivotSelections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pivotSelectionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy build() { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy buildPartial() { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy result = + new com.google.analytics.data.v1beta.OrderBy.PivotOrderBy(this); + int from_bitField0_ = bitField0_; + result.metricName_ = metricName_; + if (pivotSelectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pivotSelections_ = java.util.Collections.unmodifiableList(pivotSelections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pivotSelections_ = pivotSelections_; + } else { + result.pivotSelections_ = pivotSelectionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) { + return mergeFrom((com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.OrderBy.PivotOrderBy other) { + if (other == com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance()) + return this; + if (!other.getMetricName().isEmpty()) { + metricName_ = other.metricName_; + onChanged(); + } + if (pivotSelectionsBuilder_ == null) { + if (!other.pivotSelections_.isEmpty()) { + if (pivotSelections_.isEmpty()) { + pivotSelections_ = other.pivotSelections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePivotSelectionsIsMutable(); + pivotSelections_.addAll(other.pivotSelections_); + } + onChanged(); + } + } else { + if (!other.pivotSelections_.isEmpty()) { + if (pivotSelectionsBuilder_.isEmpty()) { + pivotSelectionsBuilder_.dispose(); + pivotSelectionsBuilder_ = null; + pivotSelections_ = other.pivotSelections_; + bitField0_ = (bitField0_ & ~0x00000001); + pivotSelectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPivotSelectionsFieldBuilder() + : null; + } else { + pivotSelectionsBuilder_.addAllMessages(other.pivotSelections_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object metricName_ = ""; + /** + * + * + *
+       * In the response to order by, order rows by this column. Must be a metric
+       * name from the request.
+       * 
+ * + * string metric_name = 1; + * + * @return The metricName. + */ + public java.lang.String getMetricName() { + java.lang.Object ref = metricName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * In the response to order by, order rows by this column. Must be a metric
+       * name from the request.
+       * 
+ * + * string metric_name = 1; + * + * @return The bytes for metricName. + */ + public com.google.protobuf.ByteString getMetricNameBytes() { + java.lang.Object ref = metricName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * In the response to order by, order rows by this column. Must be a metric
+       * name from the request.
+       * 
+ * + * string metric_name = 1; + * + * @param value The metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + metricName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * In the response to order by, order rows by this column. Must be a metric
+       * name from the request.
+       * 
+ * + * string metric_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearMetricName() { + + metricName_ = getDefaultInstance().getMetricName(); + onChanged(); + return this; + } + /** + * + * + *
+       * In the response to order by, order rows by this column. Must be a metric
+       * name from the request.
+       * 
+ * + * string metric_name = 1; + * + * @param value The bytes for metricName to set. + * @return This builder for chaining. + */ + public Builder setMetricNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + metricName_ = value; + onChanged(); + return this; + } + + private java.util.List + pivotSelections_ = java.util.Collections.emptyList(); + + private void ensurePivotSelectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pivotSelections_ = + new java.util.ArrayList< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection>( + pivotSelections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder> + pivotSelectionsBuilder_; + + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public java.util.List + getPivotSelectionsList() { + if (pivotSelectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pivotSelections_); + } else { + return pivotSelectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public int getPivotSelectionsCount() { + if (pivotSelectionsBuilder_ == null) { + return pivotSelections_.size(); + } else { + return pivotSelectionsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + getPivotSelections(int index) { + if (pivotSelectionsBuilder_ == null) { + return pivotSelections_.get(index); + } else { + return pivotSelectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder setPivotSelections( + int index, com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection value) { + if (pivotSelectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotSelectionsIsMutable(); + pivotSelections_.set(index, value); + onChanged(); + } else { + pivotSelectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder setPivotSelections( + int index, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + builderForValue) { + if (pivotSelectionsBuilder_ == null) { + ensurePivotSelectionsIsMutable(); + pivotSelections_.set(index, builderForValue.build()); + onChanged(); + } else { + pivotSelectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder addPivotSelections( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection value) { + if (pivotSelectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotSelectionsIsMutable(); + pivotSelections_.add(value); + onChanged(); + } else { + pivotSelectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder addPivotSelections( + int index, com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection value) { + if (pivotSelectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotSelectionsIsMutable(); + pivotSelections_.add(index, value); + onChanged(); + } else { + pivotSelectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder addPivotSelections( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + builderForValue) { + if (pivotSelectionsBuilder_ == null) { + ensurePivotSelectionsIsMutable(); + pivotSelections_.add(builderForValue.build()); + onChanged(); + } else { + pivotSelectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder addPivotSelections( + int index, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + builderForValue) { + if (pivotSelectionsBuilder_ == null) { + ensurePivotSelectionsIsMutable(); + pivotSelections_.add(index, builderForValue.build()); + onChanged(); + } else { + pivotSelectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder addAllPivotSelections( + java.lang.Iterable< + ? extends com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection> + values) { + if (pivotSelectionsBuilder_ == null) { + ensurePivotSelectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pivotSelections_); + onChanged(); + } else { + pivotSelectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder clearPivotSelections() { + if (pivotSelectionsBuilder_ == null) { + pivotSelections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pivotSelectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public Builder removePivotSelections(int index) { + if (pivotSelectionsBuilder_ == null) { + ensurePivotSelectionsIsMutable(); + pivotSelections_.remove(index); + onChanged(); + } else { + pivotSelectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + getPivotSelectionsBuilder(int index) { + return getPivotSelectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder + getPivotSelectionsOrBuilder(int index) { + if (pivotSelectionsBuilder_ == null) { + return pivotSelections_.get(index); + } else { + return pivotSelectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public java.util.List< + ? extends + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder> + getPivotSelectionsOrBuilderList() { + if (pivotSelectionsBuilder_ != null) { + return pivotSelectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pivotSelections_); + } + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + addPivotSelectionsBuilder() { + return getPivotSelectionsFieldBuilder() + .addBuilder( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + .getDefaultInstance()); + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder + addPivotSelectionsBuilder(int index) { + return getPivotSelectionsFieldBuilder() + .addBuilder( + index, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection + .getDefaultInstance()); + } + /** + * + * + *
+       * Used to select a dimension name and value pivot. If multiple pivot
+       * selections are given, the sort occurs on rows where all pivot selection
+       * dimension name and value pairs match the row's dimension name and value
+       * pair.
+       * 
+ * + * + * repeated .google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection pivot_selections = 2; + * + */ + public java.util.List< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder> + getPivotSelectionsBuilderList() { + return getPivotSelectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder> + getPivotSelectionsFieldBuilder() { + if (pivotSelectionsBuilder_ == null) { + pivotSelectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelection.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.PivotSelectionOrBuilder>( + pivotSelections_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pivotSelections_ = null; + } + return pivotSelectionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.OrderBy.PivotOrderBy) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.OrderBy.PivotOrderBy) + private static final com.google.analytics.data.v1beta.OrderBy.PivotOrderBy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.OrderBy.PivotOrderBy(); + } + + public static com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PivotOrderBy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PivotOrderBy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int oneOrderByCase_ = 0; + private java.lang.Object oneOrderBy_; + + public enum OneOrderByCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + METRIC(1), + DIMENSION(2), + PIVOT(3), + ONEORDERBY_NOT_SET(0); + private final int value; + + private OneOrderByCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneOrderByCase valueOf(int value) { + return forNumber(value); + } + + public static OneOrderByCase forNumber(int value) { + switch (value) { + case 1: + return METRIC; + case 2: + return DIMENSION; + case 3: + return PIVOT; + case 0: + return ONEORDERBY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneOrderByCase getOneOrderByCase() { + return OneOrderByCase.forNumber(oneOrderByCase_); + } + + public static final int METRIC_FIELD_NUMBER = 1; + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return oneOrderByCase_ == 1; + } + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return The metric. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getMetric() { + if (oneOrderByCase_ == 1) { + return (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder getMetricOrBuilder() { + if (oneOrderByCase_ == 1) { + return (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + + public static final int DIMENSION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return Whether the dimension field is set. + */ + @java.lang.Override + public boolean hasDimension() { + return oneOrderByCase_ == 2; + } + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return The dimension. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDimension() { + if (oneOrderByCase_ == 2) { + return (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder + getDimensionOrBuilder() { + if (oneOrderByCase_ == 2) { + return (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + + public static final int PIVOT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return Whether the pivot field is set. + */ + @java.lang.Override + public boolean hasPivot() { + return oneOrderByCase_ == 3; + } + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return The pivot. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getPivot() { + if (oneOrderByCase_ == 3) { + return (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder getPivotOrBuilder() { + if (oneOrderByCase_ == 3) { + return (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + + public static final int DESC_FIELD_NUMBER = 4; + private boolean desc_; + /** + * + * + *
+   * If true, sorts by descending order.
+   * 
+ * + * bool desc = 4; + * + * @return The desc. + */ + @java.lang.Override + public boolean getDesc() { + return desc_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oneOrderByCase_ == 1) { + output.writeMessage(1, (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_); + } + if (oneOrderByCase_ == 2) { + output.writeMessage( + 2, (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_); + } + if (oneOrderByCase_ == 3) { + output.writeMessage(3, (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_); + } + if (desc_ != false) { + output.writeBool(4, desc_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneOrderByCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_); + } + if (oneOrderByCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_); + } + if (oneOrderByCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_); + } + if (desc_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, desc_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.OrderBy)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.OrderBy other = (com.google.analytics.data.v1beta.OrderBy) obj; + + if (getDesc() != other.getDesc()) return false; + if (!getOneOrderByCase().equals(other.getOneOrderByCase())) return false; + switch (oneOrderByCase_) { + case 1: + if (!getMetric().equals(other.getMetric())) return false; + break; + case 2: + if (!getDimension().equals(other.getDimension())) return false; + break; + case 3: + if (!getPivot().equals(other.getPivot())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDesc()); + switch (oneOrderByCase_) { + case 1: + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + break; + case 2: + hash = (37 * hash) + DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getDimension().hashCode(); + break; + case 3: + hash = (37 * hash) + PIVOT_FIELD_NUMBER; + hash = (53 * hash) + getPivot().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.OrderBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.OrderBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The sort options.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.OrderBy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.OrderBy) + com.google.analytics.data.v1beta.OrderByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.OrderBy.class, + com.google.analytics.data.v1beta.OrderBy.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.OrderBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + desc_ = false; + + oneOrderByCase_ = 0; + oneOrderBy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_OrderBy_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.OrderBy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy build() { + com.google.analytics.data.v1beta.OrderBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy buildPartial() { + com.google.analytics.data.v1beta.OrderBy result = + new com.google.analytics.data.v1beta.OrderBy(this); + if (oneOrderByCase_ == 1) { + if (metricBuilder_ == null) { + result.oneOrderBy_ = oneOrderBy_; + } else { + result.oneOrderBy_ = metricBuilder_.build(); + } + } + if (oneOrderByCase_ == 2) { + if (dimensionBuilder_ == null) { + result.oneOrderBy_ = oneOrderBy_; + } else { + result.oneOrderBy_ = dimensionBuilder_.build(); + } + } + if (oneOrderByCase_ == 3) { + if (pivotBuilder_ == null) { + result.oneOrderBy_ = oneOrderBy_; + } else { + result.oneOrderBy_ = pivotBuilder_.build(); + } + } + result.desc_ = desc_; + result.oneOrderByCase_ = oneOrderByCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.OrderBy) { + return mergeFrom((com.google.analytics.data.v1beta.OrderBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.OrderBy other) { + if (other == com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()) return this; + if (other.getDesc() != false) { + setDesc(other.getDesc()); + } + switch (other.getOneOrderByCase()) { + case METRIC: + { + mergeMetric(other.getMetric()); + break; + } + case DIMENSION: + { + mergeDimension(other.getDimension()); + break; + } + case PIVOT: + { + mergePivot(other.getPivot()); + break; + } + case ONEORDERBY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.OrderBy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.OrderBy) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneOrderByCase_ = 0; + private java.lang.Object oneOrderBy_; + + public OneOrderByCase getOneOrderByCase() { + return OneOrderByCase.forNumber(oneOrderByCase_); + } + + public Builder clearOneOrderBy() { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy, + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder> + metricBuilder_; + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return oneOrderByCase_ == 1; + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return The metric. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getMetric() { + if (metricBuilder_ == null) { + if (oneOrderByCase_ == 1) { + return (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } else { + if (oneOrderByCase_ == 1) { + return metricBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + public Builder setMetric(com.google.analytics.data.v1beta.OrderBy.MetricOrderBy value) { + if (metricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneOrderBy_ = value; + onChanged(); + } else { + metricBuilder_.setMessage(value); + } + oneOrderByCase_ = 1; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + public Builder setMetric( + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder builderForValue) { + if (metricBuilder_ == null) { + oneOrderBy_ = builderForValue.build(); + onChanged(); + } else { + metricBuilder_.setMessage(builderForValue.build()); + } + oneOrderByCase_ = 1; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + public Builder mergeMetric(com.google.analytics.data.v1beta.OrderBy.MetricOrderBy value) { + if (metricBuilder_ == null) { + if (oneOrderByCase_ == 1 + && oneOrderBy_ + != com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance()) { + oneOrderBy_ = + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.newBuilder( + (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_) + .mergeFrom(value) + .buildPartial(); + } else { + oneOrderBy_ = value; + } + onChanged(); + } else { + if (oneOrderByCase_ == 1) { + metricBuilder_.mergeFrom(value); + } + metricBuilder_.setMessage(value); + } + oneOrderByCase_ = 1; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + public Builder clearMetric() { + if (metricBuilder_ == null) { + if (oneOrderByCase_ == 1) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + onChanged(); + } + } else { + if (oneOrderByCase_ == 1) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + } + metricBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + public com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder getMetricBuilder() { + return getMetricFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder getMetricOrBuilder() { + if ((oneOrderByCase_ == 1) && (metricBuilder_ != null)) { + return metricBuilder_.getMessageOrBuilder(); + } else { + if (oneOrderByCase_ == 1) { + return (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a metric's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy, + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder> + getMetricFieldBuilder() { + if (metricBuilder_ == null) { + if (!(oneOrderByCase_ == 1)) { + oneOrderBy_ = com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.getDefaultInstance(); + } + metricBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy, + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder>( + (com.google.analytics.data.v1beta.OrderBy.MetricOrderBy) oneOrderBy_, + getParentForChildren(), + isClean()); + oneOrderBy_ = null; + } + oneOrderByCase_ = 1; + onChanged(); + ; + return metricBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder> + dimensionBuilder_; + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return Whether the dimension field is set. + */ + @java.lang.Override + public boolean hasDimension() { + return oneOrderByCase_ == 2; + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return The dimension. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDimension() { + if (dimensionBuilder_ == null) { + if (oneOrderByCase_ == 2) { + return (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } else { + if (oneOrderByCase_ == 2) { + return dimensionBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + public Builder setDimension(com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy value) { + if (dimensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneOrderBy_ = value; + onChanged(); + } else { + dimensionBuilder_.setMessage(value); + } + oneOrderByCase_ = 2; + return this; + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + public Builder setDimension( + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder builderForValue) { + if (dimensionBuilder_ == null) { + oneOrderBy_ = builderForValue.build(); + onChanged(); + } else { + dimensionBuilder_.setMessage(builderForValue.build()); + } + oneOrderByCase_ = 2; + return this; + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + public Builder mergeDimension(com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy value) { + if (dimensionBuilder_ == null) { + if (oneOrderByCase_ == 2 + && oneOrderBy_ + != com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance()) { + oneOrderBy_ = + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.newBuilder( + (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_) + .mergeFrom(value) + .buildPartial(); + } else { + oneOrderBy_ = value; + } + onChanged(); + } else { + if (oneOrderByCase_ == 2) { + dimensionBuilder_.mergeFrom(value); + } + dimensionBuilder_.setMessage(value); + } + oneOrderByCase_ = 2; + return this; + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + public Builder clearDimension() { + if (dimensionBuilder_ == null) { + if (oneOrderByCase_ == 2) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + onChanged(); + } + } else { + if (oneOrderByCase_ == 2) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + } + dimensionBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder getDimensionBuilder() { + return getDimensionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder + getDimensionOrBuilder() { + if ((oneOrderByCase_ == 2) && (dimensionBuilder_ != null)) { + return dimensionBuilder_.getMessageOrBuilder(); + } else { + if (oneOrderByCase_ == 2) { + return (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a dimension's values.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder> + getDimensionFieldBuilder() { + if (dimensionBuilder_ == null) { + if (!(oneOrderByCase_ == 2)) { + oneOrderBy_ = + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.getDefaultInstance(); + } + dimensionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder>( + (com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy) oneOrderBy_, + getParentForChildren(), + isClean()); + oneOrderBy_ = null; + } + oneOrderByCase_ = 2; + onChanged(); + ; + return dimensionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder> + pivotBuilder_; + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return Whether the pivot field is set. + */ + @java.lang.Override + public boolean hasPivot() { + return oneOrderByCase_ == 3; + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return The pivot. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getPivot() { + if (pivotBuilder_ == null) { + if (oneOrderByCase_ == 3) { + return (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } else { + if (oneOrderByCase_ == 3) { + return pivotBuilder_.getMessage(); + } + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + public Builder setPivot(com.google.analytics.data.v1beta.OrderBy.PivotOrderBy value) { + if (pivotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oneOrderBy_ = value; + onChanged(); + } else { + pivotBuilder_.setMessage(value); + } + oneOrderByCase_ = 3; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + public Builder setPivot( + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder builderForValue) { + if (pivotBuilder_ == null) { + oneOrderBy_ = builderForValue.build(); + onChanged(); + } else { + pivotBuilder_.setMessage(builderForValue.build()); + } + oneOrderByCase_ = 3; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + public Builder mergePivot(com.google.analytics.data.v1beta.OrderBy.PivotOrderBy value) { + if (pivotBuilder_ == null) { + if (oneOrderByCase_ == 3 + && oneOrderBy_ + != com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance()) { + oneOrderBy_ = + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.newBuilder( + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_) + .mergeFrom(value) + .buildPartial(); + } else { + oneOrderBy_ = value; + } + onChanged(); + } else { + if (oneOrderByCase_ == 3) { + pivotBuilder_.mergeFrom(value); + } + pivotBuilder_.setMessage(value); + } + oneOrderByCase_ = 3; + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + public Builder clearPivot() { + if (pivotBuilder_ == null) { + if (oneOrderByCase_ == 3) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + onChanged(); + } + } else { + if (oneOrderByCase_ == 3) { + oneOrderByCase_ = 0; + oneOrderBy_ = null; + } + pivotBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + public com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder getPivotBuilder() { + return getPivotFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder getPivotOrBuilder() { + if ((oneOrderByCase_ == 3) && (pivotBuilder_ != null)) { + return pivotBuilder_.getMessageOrBuilder(); + } else { + if (oneOrderByCase_ == 3) { + return (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_; + } + return com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + } + /** + * + * + *
+     * Sorts results by a metric's values within a pivot column group.
+     * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder> + getPivotFieldBuilder() { + if (pivotBuilder_ == null) { + if (!(oneOrderByCase_ == 3)) { + oneOrderBy_ = com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.getDefaultInstance(); + } + pivotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy, + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy.Builder, + com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder>( + (com.google.analytics.data.v1beta.OrderBy.PivotOrderBy) oneOrderBy_, + getParentForChildren(), + isClean()); + oneOrderBy_ = null; + } + oneOrderByCase_ = 3; + onChanged(); + ; + return pivotBuilder_; + } + + private boolean desc_; + /** + * + * + *
+     * If true, sorts by descending order.
+     * 
+ * + * bool desc = 4; + * + * @return The desc. + */ + @java.lang.Override + public boolean getDesc() { + return desc_; + } + /** + * + * + *
+     * If true, sorts by descending order.
+     * 
+ * + * bool desc = 4; + * + * @param value The desc to set. + * @return This builder for chaining. + */ + public Builder setDesc(boolean value) { + + desc_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, sorts by descending order.
+     * 
+ * + * bool desc = 4; + * + * @return This builder for chaining. + */ + public Builder clearDesc() { + + desc_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.OrderBy) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.OrderBy) + private static final com.google.analytics.data.v1beta.OrderBy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.OrderBy(); + } + + public static com.google.analytics.data.v1beta.OrderBy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderBy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OrderBy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderByOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderByOrBuilder.java new file mode 100644 index 00000000..23050292 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderByOrBuilder.java @@ -0,0 +1,145 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface OrderByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.OrderBy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + * + * @return The metric. + */ + com.google.analytics.data.v1beta.OrderBy.MetricOrderBy getMetric(); + /** + * + * + *
+   * Sorts results by a metric's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.MetricOrderBy metric = 1; + */ + com.google.analytics.data.v1beta.OrderBy.MetricOrderByOrBuilder getMetricOrBuilder(); + + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return Whether the dimension field is set. + */ + boolean hasDimension(); + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + * + * @return The dimension. + */ + com.google.analytics.data.v1beta.OrderBy.DimensionOrderBy getDimension(); + /** + * + * + *
+   * Sorts results by a dimension's values.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.DimensionOrderBy dimension = 2; + */ + com.google.analytics.data.v1beta.OrderBy.DimensionOrderByOrBuilder getDimensionOrBuilder(); + + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return Whether the pivot field is set. + */ + boolean hasPivot(); + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + * + * @return The pivot. + */ + com.google.analytics.data.v1beta.OrderBy.PivotOrderBy getPivot(); + /** + * + * + *
+   * Sorts results by a metric's values within a pivot column group.
+   * 
+ * + * .google.analytics.data.v1beta.OrderBy.PivotOrderBy pivot = 3; + */ + com.google.analytics.data.v1beta.OrderBy.PivotOrderByOrBuilder getPivotOrBuilder(); + + /** + * + * + *
+   * If true, sorts by descending order.
+   * 
+ * + * bool desc = 4; + * + * @return The desc. + */ + boolean getDesc(); + + public com.google.analytics.data.v1beta.OrderBy.OneOrderByCase getOneOrderByCase(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Pivot.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Pivot.java new file mode 100644 index 00000000..e52d34e1 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Pivot.java @@ -0,0 +1,1978 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Describes the visible dimension columns and rows in the report response.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Pivot} + */ +public final class Pivot extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Pivot) + PivotOrBuilder { + private static final long serialVersionUID = 0L; + // Use Pivot.newBuilder() to construct. + private Pivot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Pivot() { + fieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + orderBys_ = java.util.Collections.emptyList(); + metricAggregations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Pivot(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Pivot( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fieldNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + fieldNames_.add(s); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + orderBys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + orderBys_.add( + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.parser(), extensionRegistry)); + break; + } + case 24: + { + offset_ = input.readInt64(); + break; + } + case 32: + { + limit_ = input.readInt64(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + metricAggregations_.add(rawValue); + break; + } + case 42: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + metricAggregations_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fieldNames_ = fieldNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Pivot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Pivot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Pivot.class, + com.google.analytics.data.v1beta.Pivot.Builder.class); + } + + public static final int FIELD_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList fieldNames_; + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @return A list containing the fieldNames. + */ + public com.google.protobuf.ProtocolStringList getFieldNamesList() { + return fieldNames_; + } + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @return The count of fieldNames. + */ + public int getFieldNamesCount() { + return fieldNames_.size(); + } + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + public java.lang.String getFieldNames(int index) { + return fieldNames_.get(index); + } + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + public com.google.protobuf.ByteString getFieldNamesBytes(int index) { + return fieldNames_.getByteString(index); + } + + public static final int ORDER_BYS_FIELD_NUMBER = 2; + private java.util.List orderBys_; + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + @java.lang.Override + public java.util.List getOrderBysList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + @java.lang.Override + public java.util.List + getOrderBysOrBuilderList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + @java.lang.Override + public int getOrderBysCount() { + return orderBys_.size(); + } + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + return orderBys_.get(index); + } + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + return orderBys_.get(index); + } + + public static final int OFFSET_FIELD_NUMBER = 3; + private long offset_; + /** + * + * + *
+   * The row count of the start row. The first row is counted as row 0.
+   * 
+ * + * int64 offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int LIMIT_FIELD_NUMBER = 4; + private long limit_; + /** + * + * + *
+   * The number of unique combinations of dimension values to return in this
+   * pivot. If unspecified, up to 10,000 unique combinations of dimension values
+   * are returned. `limit` must be positive.
+   * The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
+   * must not exceed 100,000. For example, a two pivot request with `limit:
+   * 1000` in each pivot will fail because the product is `1,000,000`.
+   * 
+ * + * int64 limit = 4; + * + * @return The limit. + */ + @java.lang.Override + public long getLimit() { + return limit_; + } + + public static final int METRIC_AGGREGATIONS_FIELD_NUMBER = 5; + private java.util.List metricAggregations_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation> + metricAggregations_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>() { + public com.google.analytics.data.v1beta.MetricAggregation convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricAggregation result = + com.google.analytics.data.v1beta.MetricAggregation.valueOf(from); + return result == null + ? com.google.analytics.data.v1beta.MetricAggregation.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return A list containing the metricAggregations. + */ + @java.lang.Override + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return The count of metricAggregations. + */ + @java.lang.Override + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + @java.lang.Override + public java.util.List getMetricAggregationsValueList() { + return metricAggregations_; + } + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + @java.lang.Override + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + + private int metricAggregationsMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < fieldNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldNames_.getRaw(i)); + } + for (int i = 0; i < orderBys_.size(); i++) { + output.writeMessage(2, orderBys_.get(i)); + } + if (offset_ != 0L) { + output.writeInt64(3, offset_); + } + if (limit_ != 0L) { + output.writeInt64(4, limit_); + } + if (getMetricAggregationsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(metricAggregationsMemoizedSerializedSize); + } + for (int i = 0; i < metricAggregations_.size(); i++) { + output.writeEnumNoTag(metricAggregations_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < fieldNames_.size(); i++) { + dataSize += computeStringSizeNoTag(fieldNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldNamesList().size(); + } + for (int i = 0; i < orderBys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, orderBys_.get(i)); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, offset_); + } + if (limit_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, limit_); + } + { + int dataSize = 0; + for (int i = 0; i < metricAggregations_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(metricAggregations_.get(i)); + } + size += dataSize; + if (!getMetricAggregationsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + metricAggregationsMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Pivot)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Pivot other = (com.google.analytics.data.v1beta.Pivot) obj; + + if (!getFieldNamesList().equals(other.getFieldNamesList())) return false; + if (!getOrderBysList().equals(other.getOrderBysList())) return false; + if (getOffset() != other.getOffset()) return false; + if (getLimit() != other.getLimit()) return false; + if (!metricAggregations_.equals(other.metricAggregations_)) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldNamesCount() > 0) { + hash = (37 * hash) + FIELD_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getFieldNamesList().hashCode(); + } + if (getOrderBysCount() > 0) { + hash = (37 * hash) + ORDER_BYS_FIELD_NUMBER; + hash = (53 * hash) + getOrderBysList().hashCode(); + } + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOffset()); + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLimit()); + if (getMetricAggregationsCount() > 0) { + hash = (37 * hash) + METRIC_AGGREGATIONS_FIELD_NUMBER; + hash = (53 * hash) + metricAggregations_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Pivot parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Pivot parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Pivot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Pivot prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Describes the visible dimension columns and rows in the report response.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Pivot} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Pivot) + com.google.analytics.data.v1beta.PivotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Pivot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Pivot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Pivot.class, + com.google.analytics.data.v1beta.Pivot.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Pivot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOrderBysFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + fieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + orderBysBuilder_.clear(); + } + offset_ = 0L; + + limit_ = 0L; + + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Pivot_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Pivot getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Pivot.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Pivot build() { + com.google.analytics.data.v1beta.Pivot result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Pivot buildPartial() { + com.google.analytics.data.v1beta.Pivot result = + new com.google.analytics.data.v1beta.Pivot(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + fieldNames_ = fieldNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldNames_ = fieldNames_; + if (orderBysBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.orderBys_ = orderBys_; + } else { + result.orderBys_ = orderBysBuilder_.build(); + } + result.offset_ = offset_; + result.limit_ = limit_; + if (((bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.metricAggregations_ = metricAggregations_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Pivot) { + return mergeFrom((com.google.analytics.data.v1beta.Pivot) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Pivot other) { + if (other == com.google.analytics.data.v1beta.Pivot.getDefaultInstance()) return this; + if (!other.fieldNames_.isEmpty()) { + if (fieldNames_.isEmpty()) { + fieldNames_ = other.fieldNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldNamesIsMutable(); + fieldNames_.addAll(other.fieldNames_); + } + onChanged(); + } + if (orderBysBuilder_ == null) { + if (!other.orderBys_.isEmpty()) { + if (orderBys_.isEmpty()) { + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureOrderBysIsMutable(); + orderBys_.addAll(other.orderBys_); + } + onChanged(); + } + } else { + if (!other.orderBys_.isEmpty()) { + if (orderBysBuilder_.isEmpty()) { + orderBysBuilder_.dispose(); + orderBysBuilder_ = null; + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000002); + orderBysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOrderBysFieldBuilder() + : null; + } else { + orderBysBuilder_.addAllMessages(other.orderBys_); + } + } + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + if (other.getLimit() != 0L) { + setLimit(other.getLimit()); + } + if (!other.metricAggregations_.isEmpty()) { + if (metricAggregations_.isEmpty()) { + metricAggregations_ = other.metricAggregations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMetricAggregationsIsMutable(); + metricAggregations_.addAll(other.metricAggregations_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Pivot parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Pivot) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList fieldNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFieldNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fieldNames_ = new com.google.protobuf.LazyStringArrayList(fieldNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @return A list containing the fieldNames. + */ + public com.google.protobuf.ProtocolStringList getFieldNamesList() { + return fieldNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @return The count of fieldNames. + */ + public int getFieldNamesCount() { + return fieldNames_.size(); + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + public java.lang.String getFieldNames(int index) { + return fieldNames_.get(index); + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + public com.google.protobuf.ByteString getFieldNamesBytes(int index) { + return fieldNames_.getByteString(index); + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param index The index to set the value at. + * @param value The fieldNames to set. + * @return This builder for chaining. + */ + public Builder setFieldNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldNamesIsMutable(); + fieldNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param value The fieldNames to add. + * @return This builder for chaining. + */ + public Builder addFieldNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldNamesIsMutable(); + fieldNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param values The fieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllFieldNames(java.lang.Iterable values) { + ensureFieldNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldNames() { + fieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Dimension names for visible columns in the report response. Including
+     * "dateRange" produces a date range column; for each row in the response,
+     * dimension values in the date range column will indicate the corresponding
+     * date range from the request.
+     * 
+ * + * repeated string field_names = 1; + * + * @param value The bytes of the fieldNames to add. + * @return This builder for chaining. + */ + public Builder addFieldNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldNamesIsMutable(); + fieldNames_.add(value); + onChanged(); + return this; + } + + private java.util.List orderBys_ = + java.util.Collections.emptyList(); + + private void ensureOrderBysIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + orderBys_ = new java.util.ArrayList(orderBys_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + orderBysBuilder_; + + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public java.util.List getOrderBysList() { + if (orderBysBuilder_ == null) { + return java.util.Collections.unmodifiableList(orderBys_); + } else { + return orderBysBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public int getOrderBysCount() { + if (orderBysBuilder_ == null) { + return orderBys_.size(); + } else { + return orderBysBuilder_.getCount(); + } + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder setOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.set(index, value); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder setOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.set(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(value); + onChanged(); + } else { + orderBysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder addOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(index, value); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder addOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder addAllOrderBys( + java.lang.Iterable values) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orderBys_); + onChanged(); + } else { + orderBysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder clearOrderBys() { + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + orderBysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public Builder removeOrderBys(int index) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.remove(index); + onChanged(); + } else { + orderBysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder getOrderBysBuilder(int index) { + return getOrderBysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public java.util.List + getOrderBysOrBuilderList() { + if (orderBysBuilder_ != null) { + return orderBysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orderBys_); + } + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder() { + return getOrderBysFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder(int index) { + return getOrderBysFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+     * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+     * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+     * Dimensions specified in these OrderBys must be a subset of
+     * Pivot.field_names.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + public java.util.List + getOrderBysBuilderList() { + return getOrderBysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + getOrderBysFieldBuilder() { + if (orderBysBuilder_ == null) { + orderBysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder>( + orderBys_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + orderBys_ = null; + } + return orderBysBuilder_; + } + + private long offset_; + /** + * + * + *
+     * The row count of the start row. The first row is counted as row 0.
+     * 
+ * + * int64 offset = 3; + * + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + * + * + *
+     * The row count of the start row. The first row is counted as row 0.
+     * 
+ * + * int64 offset = 3; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The row count of the start row. The first row is counted as row 0.
+     * 
+ * + * int64 offset = 3; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + + offset_ = 0L; + onChanged(); + return this; + } + + private long limit_; + /** + * + * + *
+     * The number of unique combinations of dimension values to return in this
+     * pivot. If unspecified, up to 10,000 unique combinations of dimension values
+     * are returned. `limit` must be positive.
+     * The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
+     * must not exceed 100,000. For example, a two pivot request with `limit:
+     * 1000` in each pivot will fail because the product is `1,000,000`.
+     * 
+ * + * int64 limit = 4; + * + * @return The limit. + */ + @java.lang.Override + public long getLimit() { + return limit_; + } + /** + * + * + *
+     * The number of unique combinations of dimension values to return in this
+     * pivot. If unspecified, up to 10,000 unique combinations of dimension values
+     * are returned. `limit` must be positive.
+     * The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
+     * must not exceed 100,000. For example, a two pivot request with `limit:
+     * 1000` in each pivot will fail because the product is `1,000,000`.
+     * 
+ * + * int64 limit = 4; + * + * @param value The limit to set. + * @return This builder for chaining. + */ + public Builder setLimit(long value) { + + limit_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of unique combinations of dimension values to return in this
+     * pivot. If unspecified, up to 10,000 unique combinations of dimension values
+     * are returned. `limit` must be positive.
+     * The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
+     * must not exceed 100,000. For example, a two pivot request with `limit:
+     * 1000` in each pivot will fail because the product is `1,000,000`.
+     * 
+ * + * int64 limit = 4; + * + * @return This builder for chaining. + */ + public Builder clearLimit() { + + limit_ = 0L; + onChanged(); + return this; + } + + private java.util.List metricAggregations_ = + java.util.Collections.emptyList(); + + private void ensureMetricAggregationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(metricAggregations_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @return A list containing the metricAggregations. + */ + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @return The count of metricAggregations. + */ + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param index The index to set the value at. + * @param value The metricAggregations to set. + * @return This builder for chaining. + */ + public Builder setMetricAggregations( + int index, com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param value The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregations(com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param values The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregations( + java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (com.google.analytics.data.v1beta.MetricAggregation value : values) { + metricAggregations_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearMetricAggregations() { + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + public java.util.List getMetricAggregationsValueList() { + return java.util.Collections.unmodifiableList(metricAggregations_); + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + * @return This builder for chaining. + */ + public Builder setMetricAggregationsValue(int index, int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param value The enum numeric value on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregationsValue(int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregate the metrics by dimensions in this pivot using the specified
+     * metric_aggregations.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * + * @param values The enum numeric values on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregationsValue(java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (int value : values) { + metricAggregations_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Pivot) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Pivot) + private static final com.google.analytics.data.v1beta.Pivot DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Pivot(); + } + + public static com.google.analytics.data.v1beta.Pivot getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pivot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Pivot(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Pivot getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeader.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeader.java new file mode 100644 index 00000000..c6c5b916 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeader.java @@ -0,0 +1,964 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Summarizes dimension values from a row for this pivot.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PivotDimensionHeader} + */ +public final class PivotDimensionHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.PivotDimensionHeader) + PivotDimensionHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use PivotDimensionHeader.newBuilder() to construct. + private PivotDimensionHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PivotDimensionHeader() { + dimensionValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PivotDimensionHeader(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PivotDimensionHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensionValues_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionValue.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = java.util.Collections.unmodifiableList(dimensionValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotDimensionHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PivotDimensionHeader.class, + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder.class); + } + + public static final int DIMENSION_VALUES_FIELD_NUMBER = 1; + private java.util.List dimensionValues_; + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public java.util.List getDimensionValuesList() { + return dimensionValues_; + } + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public java.util.List + getDimensionValuesOrBuilderList() { + return dimensionValues_; + } + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public int getDimensionValuesCount() { + return dimensionValues_.size(); + } + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index) { + return dimensionValues_.get(index); + } + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder( + int index) { + return dimensionValues_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensionValues_.size(); i++) { + output.writeMessage(1, dimensionValues_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dimensionValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dimensionValues_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.PivotDimensionHeader)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.PivotDimensionHeader other = + (com.google.analytics.data.v1beta.PivotDimensionHeader) obj; + + if (!getDimensionValuesList().equals(other.getDimensionValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDimensionValuesCount() > 0) { + hash = (37 * hash) + DIMENSION_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getDimensionValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.PivotDimensionHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Summarizes dimension values from a row for this pivot.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PivotDimensionHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.PivotDimensionHeader) + com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotDimensionHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PivotDimensionHeader.class, + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.PivotDimensionHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dimensionValuesBuilder_ == null) { + dimensionValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeader getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.PivotDimensionHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeader build() { + com.google.analytics.data.v1beta.PivotDimensionHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeader buildPartial() { + com.google.analytics.data.v1beta.PivotDimensionHeader result = + new com.google.analytics.data.v1beta.PivotDimensionHeader(this); + int from_bitField0_ = bitField0_; + if (dimensionValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = java.util.Collections.unmodifiableList(dimensionValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensionValues_ = dimensionValues_; + } else { + result.dimensionValues_ = dimensionValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.PivotDimensionHeader) { + return mergeFrom((com.google.analytics.data.v1beta.PivotDimensionHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.PivotDimensionHeader other) { + if (other == com.google.analytics.data.v1beta.PivotDimensionHeader.getDefaultInstance()) + return this; + if (dimensionValuesBuilder_ == null) { + if (!other.dimensionValues_.isEmpty()) { + if (dimensionValues_.isEmpty()) { + dimensionValues_ = other.dimensionValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionValuesIsMutable(); + dimensionValues_.addAll(other.dimensionValues_); + } + onChanged(); + } + } else { + if (!other.dimensionValues_.isEmpty()) { + if (dimensionValuesBuilder_.isEmpty()) { + dimensionValuesBuilder_.dispose(); + dimensionValuesBuilder_ = null; + dimensionValues_ = other.dimensionValues_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionValuesFieldBuilder() + : null; + } else { + dimensionValuesBuilder_.addAllMessages(other.dimensionValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.PivotDimensionHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.PivotDimensionHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dimensionValues_ = + java.util.Collections.emptyList(); + + private void ensureDimensionValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = + new java.util.ArrayList( + dimensionValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder> + dimensionValuesBuilder_; + + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesList() { + if (dimensionValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensionValues_); + } else { + return dimensionValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public int getDimensionValuesCount() { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.size(); + } else { + return dimensionValuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index) { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.get(index); + } else { + return dimensionValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder setDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.set(index, value); + onChanged(); + } else { + dimensionValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder setDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues(com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.add(value); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.add(index, value); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.add(builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addAllDimensionValues( + java.lang.Iterable values) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionValues_); + onChanged(); + } else { + dimensionValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder clearDimensionValues() { + if (dimensionValuesBuilder_ == null) { + dimensionValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder removeDimensionValues(int index) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.remove(index); + onChanged(); + } else { + dimensionValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder getDimensionValuesBuilder( + int index) { + return getDimensionValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder( + int index) { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.get(index); + } else { + return dimensionValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesOrBuilderList() { + if (dimensionValuesBuilder_ != null) { + return dimensionValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensionValues_); + } + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder addDimensionValuesBuilder() { + return getDimensionValuesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance()); + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder addDimensionValuesBuilder( + int index) { + return getDimensionValuesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance()); + } + /** + * + * + *
+     * Values of multiple dimensions in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesBuilderList() { + return getDimensionValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder> + getDimensionValuesFieldBuilder() { + if (dimensionValuesBuilder_ == null) { + dimensionValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder>( + dimensionValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dimensionValues_ = null; + } + return dimensionValuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.PivotDimensionHeader) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.PivotDimensionHeader) + private static final com.google.analytics.data.v1beta.PivotDimensionHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.PivotDimensionHeader(); + } + + public static com.google.analytics.data.v1beta.PivotDimensionHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PivotDimensionHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PivotDimensionHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeaderOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeaderOrBuilder.java new file mode 100644 index 00000000..82e101b6 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeaderOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface PivotDimensionHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.PivotDimensionHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + java.util.List getDimensionValuesList(); + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index); + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + int getDimensionValuesCount(); + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + java.util.List + getDimensionValuesOrBuilderList(); + /** + * + * + *
+   * Values of multiple dimensions in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeader.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeader.java new file mode 100644 index 00000000..6391c40b --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeader.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Dimensions' values in a single pivot.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PivotHeader} + */ +public final class PivotHeader extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.PivotHeader) + PivotHeaderOrBuilder { + private static final long serialVersionUID = 0L; + // Use PivotHeader.newBuilder() to construct. + private PivotHeader(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PivotHeader() { + pivotDimensionHeaders_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PivotHeader(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PivotHeader( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pivotDimensionHeaders_ = + new java.util.ArrayList< + com.google.analytics.data.v1beta.PivotDimensionHeader>(); + mutable_bitField0_ |= 0x00000001; + } + pivotDimensionHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.PivotDimensionHeader.parser(), + extensionRegistry)); + break; + } + case 16: + { + rowCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pivotDimensionHeaders_ = java.util.Collections.unmodifiableList(pivotDimensionHeaders_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PivotHeader.class, + com.google.analytics.data.v1beta.PivotHeader.Builder.class); + } + + public static final int PIVOT_DIMENSION_HEADERS_FIELD_NUMBER = 1; + private java.util.List + pivotDimensionHeaders_; + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + @java.lang.Override + public java.util.List + getPivotDimensionHeadersList() { + return pivotDimensionHeaders_; + } + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + @java.lang.Override + public java.util.List + getPivotDimensionHeadersOrBuilderList() { + return pivotDimensionHeaders_; + } + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + @java.lang.Override + public int getPivotDimensionHeadersCount() { + return pivotDimensionHeaders_.size(); + } + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeader getPivotDimensionHeaders(int index) { + return pivotDimensionHeaders_.get(index); + } + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder + getPivotDimensionHeadersOrBuilder(int index) { + return pivotDimensionHeaders_.get(index); + } + + public static final int ROW_COUNT_FIELD_NUMBER = 2; + private int rowCount_; + /** + * + * + *
+   * The cardinality of the pivot. The total number of rows for this pivot's
+   * fields regardless of how the parameters `offset` and `limit` are specified
+   * in the request.
+   * 
+ * + * int32 row_count = 2; + * + * @return The rowCount. + */ + @java.lang.Override + public int getRowCount() { + return rowCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < pivotDimensionHeaders_.size(); i++) { + output.writeMessage(1, pivotDimensionHeaders_.get(i)); + } + if (rowCount_ != 0) { + output.writeInt32(2, rowCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pivotDimensionHeaders_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, pivotDimensionHeaders_.get(i)); + } + if (rowCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, rowCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.PivotHeader)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.PivotHeader other = + (com.google.analytics.data.v1beta.PivotHeader) obj; + + if (!getPivotDimensionHeadersList().equals(other.getPivotDimensionHeadersList())) return false; + if (getRowCount() != other.getRowCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPivotDimensionHeadersCount() > 0) { + hash = (37 * hash) + PIVOT_DIMENSION_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getPivotDimensionHeadersList().hashCode(); + } + hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRowCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PivotHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.PivotHeader prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dimensions' values in a single pivot.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PivotHeader} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.PivotHeader) + com.google.analytics.data.v1beta.PivotHeaderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotHeader_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotHeader_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PivotHeader.class, + com.google.analytics.data.v1beta.PivotHeader.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.PivotHeader.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPivotDimensionHeadersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pivotDimensionHeadersBuilder_ == null) { + pivotDimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pivotDimensionHeadersBuilder_.clear(); + } + rowCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PivotHeader_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeader getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.PivotHeader.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeader build() { + com.google.analytics.data.v1beta.PivotHeader result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeader buildPartial() { + com.google.analytics.data.v1beta.PivotHeader result = + new com.google.analytics.data.v1beta.PivotHeader(this); + int from_bitField0_ = bitField0_; + if (pivotDimensionHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pivotDimensionHeaders_ = java.util.Collections.unmodifiableList(pivotDimensionHeaders_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pivotDimensionHeaders_ = pivotDimensionHeaders_; + } else { + result.pivotDimensionHeaders_ = pivotDimensionHeadersBuilder_.build(); + } + result.rowCount_ = rowCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.PivotHeader) { + return mergeFrom((com.google.analytics.data.v1beta.PivotHeader) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.PivotHeader other) { + if (other == com.google.analytics.data.v1beta.PivotHeader.getDefaultInstance()) return this; + if (pivotDimensionHeadersBuilder_ == null) { + if (!other.pivotDimensionHeaders_.isEmpty()) { + if (pivotDimensionHeaders_.isEmpty()) { + pivotDimensionHeaders_ = other.pivotDimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.addAll(other.pivotDimensionHeaders_); + } + onChanged(); + } + } else { + if (!other.pivotDimensionHeaders_.isEmpty()) { + if (pivotDimensionHeadersBuilder_.isEmpty()) { + pivotDimensionHeadersBuilder_.dispose(); + pivotDimensionHeadersBuilder_ = null; + pivotDimensionHeaders_ = other.pivotDimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + pivotDimensionHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPivotDimensionHeadersFieldBuilder() + : null; + } else { + pivotDimensionHeadersBuilder_.addAllMessages(other.pivotDimensionHeaders_); + } + } + } + if (other.getRowCount() != 0) { + setRowCount(other.getRowCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.PivotHeader parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.PivotHeader) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + pivotDimensionHeaders_ = java.util.Collections.emptyList(); + + private void ensurePivotDimensionHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pivotDimensionHeaders_ = + new java.util.ArrayList( + pivotDimensionHeaders_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotDimensionHeader, + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder, + com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder> + pivotDimensionHeadersBuilder_; + + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public java.util.List + getPivotDimensionHeadersList() { + if (pivotDimensionHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(pivotDimensionHeaders_); + } else { + return pivotDimensionHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public int getPivotDimensionHeadersCount() { + if (pivotDimensionHeadersBuilder_ == null) { + return pivotDimensionHeaders_.size(); + } else { + return pivotDimensionHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public com.google.analytics.data.v1beta.PivotDimensionHeader getPivotDimensionHeaders( + int index) { + if (pivotDimensionHeadersBuilder_ == null) { + return pivotDimensionHeaders_.get(index); + } else { + return pivotDimensionHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder setPivotDimensionHeaders( + int index, com.google.analytics.data.v1beta.PivotDimensionHeader value) { + if (pivotDimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.set(index, value); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder setPivotDimensionHeaders( + int index, com.google.analytics.data.v1beta.PivotDimensionHeader.Builder builderForValue) { + if (pivotDimensionHeadersBuilder_ == null) { + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder addPivotDimensionHeaders( + com.google.analytics.data.v1beta.PivotDimensionHeader value) { + if (pivotDimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.add(value); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder addPivotDimensionHeaders( + int index, com.google.analytics.data.v1beta.PivotDimensionHeader value) { + if (pivotDimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.add(index, value); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder addPivotDimensionHeaders( + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder builderForValue) { + if (pivotDimensionHeadersBuilder_ == null) { + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.add(builderForValue.build()); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder addPivotDimensionHeaders( + int index, com.google.analytics.data.v1beta.PivotDimensionHeader.Builder builderForValue) { + if (pivotDimensionHeadersBuilder_ == null) { + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder addAllPivotDimensionHeaders( + java.lang.Iterable + values) { + if (pivotDimensionHeadersBuilder_ == null) { + ensurePivotDimensionHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pivotDimensionHeaders_); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder clearPivotDimensionHeaders() { + if (pivotDimensionHeadersBuilder_ == null) { + pivotDimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public Builder removePivotDimensionHeaders(int index) { + if (pivotDimensionHeadersBuilder_ == null) { + ensurePivotDimensionHeadersIsMutable(); + pivotDimensionHeaders_.remove(index); + onChanged(); + } else { + pivotDimensionHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public com.google.analytics.data.v1beta.PivotDimensionHeader.Builder + getPivotDimensionHeadersBuilder(int index) { + return getPivotDimensionHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder + getPivotDimensionHeadersOrBuilder(int index) { + if (pivotDimensionHeadersBuilder_ == null) { + return pivotDimensionHeaders_.get(index); + } else { + return pivotDimensionHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public java.util.List + getPivotDimensionHeadersOrBuilderList() { + if (pivotDimensionHeadersBuilder_ != null) { + return pivotDimensionHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pivotDimensionHeaders_); + } + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public com.google.analytics.data.v1beta.PivotDimensionHeader.Builder + addPivotDimensionHeadersBuilder() { + return getPivotDimensionHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.PivotDimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public com.google.analytics.data.v1beta.PivotDimensionHeader.Builder + addPivotDimensionHeadersBuilder(int index) { + return getPivotDimensionHeadersFieldBuilder() + .addBuilder( + index, com.google.analytics.data.v1beta.PivotDimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * The size is the same as the cardinality of the corresponding dimension
+     * combinations.
+     * 
+ * + * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + public java.util.List + getPivotDimensionHeadersBuilderList() { + return getPivotDimensionHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotDimensionHeader, + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder, + com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder> + getPivotDimensionHeadersFieldBuilder() { + if (pivotDimensionHeadersBuilder_ == null) { + pivotDimensionHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotDimensionHeader, + com.google.analytics.data.v1beta.PivotDimensionHeader.Builder, + com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder>( + pivotDimensionHeaders_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + pivotDimensionHeaders_ = null; + } + return pivotDimensionHeadersBuilder_; + } + + private int rowCount_; + /** + * + * + *
+     * The cardinality of the pivot. The total number of rows for this pivot's
+     * fields regardless of how the parameters `offset` and `limit` are specified
+     * in the request.
+     * 
+ * + * int32 row_count = 2; + * + * @return The rowCount. + */ + @java.lang.Override + public int getRowCount() { + return rowCount_; + } + /** + * + * + *
+     * The cardinality of the pivot. The total number of rows for this pivot's
+     * fields regardless of how the parameters `offset` and `limit` are specified
+     * in the request.
+     * 
+ * + * int32 row_count = 2; + * + * @param value The rowCount to set. + * @return This builder for chaining. + */ + public Builder setRowCount(int value) { + + rowCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The cardinality of the pivot. The total number of rows for this pivot's
+     * fields regardless of how the parameters `offset` and `limit` are specified
+     * in the request.
+     * 
+ * + * int32 row_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowCount() { + + rowCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.PivotHeader) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.PivotHeader) + private static final com.google.analytics.data.v1beta.PivotHeader DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.PivotHeader(); + } + + public static com.google.analytics.data.v1beta.PivotHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PivotHeader parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PivotHeader(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeader getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeaderOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeaderOrBuilder.java new file mode 100644 index 00000000..add1a37e --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeaderOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface PivotHeaderOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.PivotHeader) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + java.util.List + getPivotDimensionHeadersList(); + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + com.google.analytics.data.v1beta.PivotDimensionHeader getPivotDimensionHeaders(int index); + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + int getPivotDimensionHeadersCount(); + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + java.util.List + getPivotDimensionHeadersOrBuilderList(); + /** + * + * + *
+   * The size is the same as the cardinality of the corresponding dimension
+   * combinations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotDimensionHeader pivot_dimension_headers = 1; + * + */ + com.google.analytics.data.v1beta.PivotDimensionHeaderOrBuilder getPivotDimensionHeadersOrBuilder( + int index); + + /** + * + * + *
+   * The cardinality of the pivot. The total number of rows for this pivot's
+   * fields regardless of how the parameters `offset` and `limit` are specified
+   * in the request.
+   * 
+ * + * int32 row_count = 2; + * + * @return The rowCount. + */ + int getRowCount(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotOrBuilder.java new file mode 100644 index 00000000..9471eef0 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotOrBuilder.java @@ -0,0 +1,259 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface PivotOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Pivot) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @return A list containing the fieldNames. + */ + java.util.List getFieldNamesList(); + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @return The count of fieldNames. + */ + int getFieldNamesCount(); + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + java.lang.String getFieldNames(int index); + /** + * + * + *
+   * Dimension names for visible columns in the report response. Including
+   * "dateRange" produces a date range column; for each row in the response,
+   * dimension values in the date range column will indicate the corresponding
+   * date range from the request.
+   * 
+ * + * repeated string field_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + com.google.protobuf.ByteString getFieldNamesBytes(int index); + + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + java.util.List getOrderBysList(); + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + com.google.analytics.data.v1beta.OrderBy getOrderBys(int index); + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + int getOrderBysCount(); + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + java.util.List + getOrderBysOrBuilderList(); + /** + * + * + *
+   * Specifies how dimensions are ordered in the pivot. In the first Pivot, the
+   * OrderBys determine Row and PivotDimensionHeader ordering; in subsequent
+   * Pivots, the OrderBys determine only PivotDimensionHeader ordering.
+   * Dimensions specified in these OrderBys must be a subset of
+   * Pivot.field_names.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 2; + */ + com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index); + + /** + * + * + *
+   * The row count of the start row. The first row is counted as row 0.
+   * 
+ * + * int64 offset = 3; + * + * @return The offset. + */ + long getOffset(); + + /** + * + * + *
+   * The number of unique combinations of dimension values to return in this
+   * pivot. If unspecified, up to 10,000 unique combinations of dimension values
+   * are returned. `limit` must be positive.
+   * The product of the `limit` for each `pivot` in a `RunPivotReportRequest`
+   * must not exceed 100,000. For example, a two pivot request with `limit:
+   * 1000` in each pivot will fail because the product is `1,000,000`.
+   * 
+ * + * int64 limit = 4; + * + * @return The limit. + */ + long getLimit(); + + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return A list containing the metricAggregations. + */ + java.util.List getMetricAggregationsList(); + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return The count of metricAggregations. + */ + int getMetricAggregationsCount(); + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index); + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + java.util.List getMetricAggregationsValueList(); + /** + * + * + *
+   * Aggregate the metrics by dimensions in this pivot using the specified
+   * metric_aggregations.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + int getMetricAggregationsValue(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuota.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuota.java new file mode 100644 index 00000000..ebb6d7f0 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuota.java @@ -0,0 +1,1686 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PropertyQuota} + */ +public final class PropertyQuota extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.PropertyQuota) + PropertyQuotaOrBuilder { + private static final long serialVersionUID = 0L; + // Use PropertyQuota.newBuilder() to construct. + private PropertyQuota(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PropertyQuota() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PropertyQuota(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PropertyQuota( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.analytics.data.v1beta.QuotaStatus.Builder subBuilder = null; + if (tokensPerDay_ != null) { + subBuilder = tokensPerDay_.toBuilder(); + } + tokensPerDay_ = + input.readMessage( + com.google.analytics.data.v1beta.QuotaStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tokensPerDay_); + tokensPerDay_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.analytics.data.v1beta.QuotaStatus.Builder subBuilder = null; + if (tokensPerHour_ != null) { + subBuilder = tokensPerHour_.toBuilder(); + } + tokensPerHour_ = + input.readMessage( + com.google.analytics.data.v1beta.QuotaStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tokensPerHour_); + tokensPerHour_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.analytics.data.v1beta.QuotaStatus.Builder subBuilder = null; + if (concurrentRequests_ != null) { + subBuilder = concurrentRequests_.toBuilder(); + } + concurrentRequests_ = + input.readMessage( + com.google.analytics.data.v1beta.QuotaStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(concurrentRequests_); + concurrentRequests_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.analytics.data.v1beta.QuotaStatus.Builder subBuilder = null; + if (serverErrorsPerProjectPerHour_ != null) { + subBuilder = serverErrorsPerProjectPerHour_.toBuilder(); + } + serverErrorsPerProjectPerHour_ = + input.readMessage( + com.google.analytics.data.v1beta.QuotaStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serverErrorsPerProjectPerHour_); + serverErrorsPerProjectPerHour_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PropertyQuota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PropertyQuota.class, + com.google.analytics.data.v1beta.PropertyQuota.Builder.class); + } + + public static final int TOKENS_PER_DAY_FIELD_NUMBER = 1; + private com.google.analytics.data.v1beta.QuotaStatus tokensPerDay_; + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + @java.lang.Override + public boolean hasTokensPerDay() { + return tokensPerDay_ != null; + } + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getTokensPerDay() { + return tokensPerDay_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerDayOrBuilder() { + return getTokensPerDay(); + } + + public static final int TOKENS_PER_HOUR_FIELD_NUMBER = 2; + private com.google.analytics.data.v1beta.QuotaStatus tokensPerHour_; + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + @java.lang.Override + public boolean hasTokensPerHour() { + return tokensPerHour_ != null; + } + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getTokensPerHour() { + return tokensPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerHourOrBuilder() { + return getTokensPerHour(); + } + + public static final int CONCURRENT_REQUESTS_FIELD_NUMBER = 3; + private com.google.analytics.data.v1beta.QuotaStatus concurrentRequests_; + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return Whether the concurrentRequests field is set. + */ + @java.lang.Override + public boolean hasConcurrentRequests() { + return concurrentRequests_ != null; + } + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return The concurrentRequests. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getConcurrentRequests() { + return concurrentRequests_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : concurrentRequests_; + } + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getConcurrentRequestsOrBuilder() { + return getConcurrentRequests(); + } + + public static final int SERVER_ERRORS_PER_PROJECT_PER_HOUR_FIELD_NUMBER = 4; + private com.google.analytics.data.v1beta.QuotaStatus serverErrorsPerProjectPerHour_; + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * @return Whether the serverErrorsPerProjectPerHour field is set. + */ + @java.lang.Override + public boolean hasServerErrorsPerProjectPerHour() { + return serverErrorsPerProjectPerHour_ != null; + } + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * @return The serverErrorsPerProjectPerHour. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getServerErrorsPerProjectPerHour() { + return serverErrorsPerProjectPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : serverErrorsPerProjectPerHour_; + } + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder + getServerErrorsPerProjectPerHourOrBuilder() { + return getServerErrorsPerProjectPerHour(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tokensPerDay_ != null) { + output.writeMessage(1, getTokensPerDay()); + } + if (tokensPerHour_ != null) { + output.writeMessage(2, getTokensPerHour()); + } + if (concurrentRequests_ != null) { + output.writeMessage(3, getConcurrentRequests()); + } + if (serverErrorsPerProjectPerHour_ != null) { + output.writeMessage(4, getServerErrorsPerProjectPerHour()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tokensPerDay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTokensPerDay()); + } + if (tokensPerHour_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTokensPerHour()); + } + if (concurrentRequests_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getConcurrentRequests()); + } + if (serverErrorsPerProjectPerHour_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getServerErrorsPerProjectPerHour()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.PropertyQuota)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.PropertyQuota other = + (com.google.analytics.data.v1beta.PropertyQuota) obj; + + if (hasTokensPerDay() != other.hasTokensPerDay()) return false; + if (hasTokensPerDay()) { + if (!getTokensPerDay().equals(other.getTokensPerDay())) return false; + } + if (hasTokensPerHour() != other.hasTokensPerHour()) return false; + if (hasTokensPerHour()) { + if (!getTokensPerHour().equals(other.getTokensPerHour())) return false; + } + if (hasConcurrentRequests() != other.hasConcurrentRequests()) return false; + if (hasConcurrentRequests()) { + if (!getConcurrentRequests().equals(other.getConcurrentRequests())) return false; + } + if (hasServerErrorsPerProjectPerHour() != other.hasServerErrorsPerProjectPerHour()) + return false; + if (hasServerErrorsPerProjectPerHour()) { + if (!getServerErrorsPerProjectPerHour().equals(other.getServerErrorsPerProjectPerHour())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTokensPerDay()) { + hash = (37 * hash) + TOKENS_PER_DAY_FIELD_NUMBER; + hash = (53 * hash) + getTokensPerDay().hashCode(); + } + if (hasTokensPerHour()) { + hash = (37 * hash) + TOKENS_PER_HOUR_FIELD_NUMBER; + hash = (53 * hash) + getTokensPerHour().hashCode(); + } + if (hasConcurrentRequests()) { + hash = (37 * hash) + CONCURRENT_REQUESTS_FIELD_NUMBER; + hash = (53 * hash) + getConcurrentRequests().hashCode(); + } + if (hasServerErrorsPerProjectPerHour()) { + hash = (37 * hash) + SERVER_ERRORS_PER_PROJECT_PER_HOUR_FIELD_NUMBER; + hash = (53 * hash) + getServerErrorsPerProjectPerHour().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.PropertyQuota parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.PropertyQuota prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.PropertyQuota} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.PropertyQuota) + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PropertyQuota_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.PropertyQuota.class, + com.google.analytics.data.v1beta.PropertyQuota.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.PropertyQuota.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (tokensPerDayBuilder_ == null) { + tokensPerDay_ = null; + } else { + tokensPerDay_ = null; + tokensPerDayBuilder_ = null; + } + if (tokensPerHourBuilder_ == null) { + tokensPerHour_ = null; + } else { + tokensPerHour_ = null; + tokensPerHourBuilder_ = null; + } + if (concurrentRequestsBuilder_ == null) { + concurrentRequests_ = null; + } else { + concurrentRequests_ = null; + concurrentRequestsBuilder_ = null; + } + if (serverErrorsPerProjectPerHourBuilder_ == null) { + serverErrorsPerProjectPerHour_ = null; + } else { + serverErrorsPerProjectPerHour_ = null; + serverErrorsPerProjectPerHourBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota build() { + com.google.analytics.data.v1beta.PropertyQuota result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota buildPartial() { + com.google.analytics.data.v1beta.PropertyQuota result = + new com.google.analytics.data.v1beta.PropertyQuota(this); + if (tokensPerDayBuilder_ == null) { + result.tokensPerDay_ = tokensPerDay_; + } else { + result.tokensPerDay_ = tokensPerDayBuilder_.build(); + } + if (tokensPerHourBuilder_ == null) { + result.tokensPerHour_ = tokensPerHour_; + } else { + result.tokensPerHour_ = tokensPerHourBuilder_.build(); + } + if (concurrentRequestsBuilder_ == null) { + result.concurrentRequests_ = concurrentRequests_; + } else { + result.concurrentRequests_ = concurrentRequestsBuilder_.build(); + } + if (serverErrorsPerProjectPerHourBuilder_ == null) { + result.serverErrorsPerProjectPerHour_ = serverErrorsPerProjectPerHour_; + } else { + result.serverErrorsPerProjectPerHour_ = serverErrorsPerProjectPerHourBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.PropertyQuota) { + return mergeFrom((com.google.analytics.data.v1beta.PropertyQuota) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.PropertyQuota other) { + if (other == com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance()) return this; + if (other.hasTokensPerDay()) { + mergeTokensPerDay(other.getTokensPerDay()); + } + if (other.hasTokensPerHour()) { + mergeTokensPerHour(other.getTokensPerHour()); + } + if (other.hasConcurrentRequests()) { + mergeConcurrentRequests(other.getConcurrentRequests()); + } + if (other.hasServerErrorsPerProjectPerHour()) { + mergeServerErrorsPerProjectPerHour(other.getServerErrorsPerProjectPerHour()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.PropertyQuota parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.PropertyQuota) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.analytics.data.v1beta.QuotaStatus tokensPerDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + tokensPerDayBuilder_; + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + public boolean hasTokensPerDay() { + return tokensPerDayBuilder_ != null || tokensPerDay_ != null; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + public com.google.analytics.data.v1beta.QuotaStatus getTokensPerDay() { + if (tokensPerDayBuilder_ == null) { + return tokensPerDay_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } else { + return tokensPerDayBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public Builder setTokensPerDay(com.google.analytics.data.v1beta.QuotaStatus value) { + if (tokensPerDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tokensPerDay_ = value; + onChanged(); + } else { + tokensPerDayBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public Builder setTokensPerDay( + com.google.analytics.data.v1beta.QuotaStatus.Builder builderForValue) { + if (tokensPerDayBuilder_ == null) { + tokensPerDay_ = builderForValue.build(); + onChanged(); + } else { + tokensPerDayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public Builder mergeTokensPerDay(com.google.analytics.data.v1beta.QuotaStatus value) { + if (tokensPerDayBuilder_ == null) { + if (tokensPerDay_ != null) { + tokensPerDay_ = + com.google.analytics.data.v1beta.QuotaStatus.newBuilder(tokensPerDay_) + .mergeFrom(value) + .buildPartial(); + } else { + tokensPerDay_ = value; + } + onChanged(); + } else { + tokensPerDayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public Builder clearTokensPerDay() { + if (tokensPerDayBuilder_ == null) { + tokensPerDay_ = null; + onChanged(); + } else { + tokensPerDay_ = null; + tokensPerDayBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public com.google.analytics.data.v1beta.QuotaStatus.Builder getTokensPerDayBuilder() { + + onChanged(); + return getTokensPerDayFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerDayOrBuilder() { + if (tokensPerDayBuilder_ != null) { + return tokensPerDayBuilder_.getMessageOrBuilder(); + } else { + return tokensPerDay_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerDay_; + } + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 25,000 tokens per day;
+     * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+     * consume fewer than 10 tokens.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + getTokensPerDayFieldBuilder() { + if (tokensPerDayBuilder_ == null) { + tokensPerDayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder>( + getTokensPerDay(), getParentForChildren(), isClean()); + tokensPerDay_ = null; + } + return tokensPerDayBuilder_; + } + + private com.google.analytics.data.v1beta.QuotaStatus tokensPerHour_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + tokensPerHourBuilder_; + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + public boolean hasTokensPerHour() { + return tokensPerHourBuilder_ != null || tokensPerHour_ != null; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + public com.google.analytics.data.v1beta.QuotaStatus getTokensPerHour() { + if (tokensPerHourBuilder_ == null) { + return tokensPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } else { + return tokensPerHourBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public Builder setTokensPerHour(com.google.analytics.data.v1beta.QuotaStatus value) { + if (tokensPerHourBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tokensPerHour_ = value; + onChanged(); + } else { + tokensPerHourBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public Builder setTokensPerHour( + com.google.analytics.data.v1beta.QuotaStatus.Builder builderForValue) { + if (tokensPerHourBuilder_ == null) { + tokensPerHour_ = builderForValue.build(); + onChanged(); + } else { + tokensPerHourBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public Builder mergeTokensPerHour(com.google.analytics.data.v1beta.QuotaStatus value) { + if (tokensPerHourBuilder_ == null) { + if (tokensPerHour_ != null) { + tokensPerHour_ = + com.google.analytics.data.v1beta.QuotaStatus.newBuilder(tokensPerHour_) + .mergeFrom(value) + .buildPartial(); + } else { + tokensPerHour_ = value; + } + onChanged(); + } else { + tokensPerHourBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public Builder clearTokensPerHour() { + if (tokensPerHourBuilder_ == null) { + tokensPerHour_ = null; + onChanged(); + } else { + tokensPerHour_ = null; + tokensPerHourBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public com.google.analytics.data.v1beta.QuotaStatus.Builder getTokensPerHourBuilder() { + + onChanged(); + return getTokensPerHourFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerHourOrBuilder() { + if (tokensPerHourBuilder_ != null) { + return tokensPerHourBuilder_.getMessageOrBuilder(); + } else { + return tokensPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : tokensPerHour_; + } + } + /** + * + * + *
+     * Standard Analytics Properties can use up to 5,000 tokens per hour;
+     * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+     * consumes a single number of tokens, and that number is deducted from both
+     * the hourly and daily quotas.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + getTokensPerHourFieldBuilder() { + if (tokensPerHourBuilder_ == null) { + tokensPerHourBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder>( + getTokensPerHour(), getParentForChildren(), isClean()); + tokensPerHour_ = null; + } + return tokensPerHourBuilder_; + } + + private com.google.analytics.data.v1beta.QuotaStatus concurrentRequests_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + concurrentRequestsBuilder_; + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return Whether the concurrentRequests field is set. + */ + public boolean hasConcurrentRequests() { + return concurrentRequestsBuilder_ != null || concurrentRequests_ != null; + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return The concurrentRequests. + */ + public com.google.analytics.data.v1beta.QuotaStatus getConcurrentRequests() { + if (concurrentRequestsBuilder_ == null) { + return concurrentRequests_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : concurrentRequests_; + } else { + return concurrentRequestsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public Builder setConcurrentRequests(com.google.analytics.data.v1beta.QuotaStatus value) { + if (concurrentRequestsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + concurrentRequests_ = value; + onChanged(); + } else { + concurrentRequestsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public Builder setConcurrentRequests( + com.google.analytics.data.v1beta.QuotaStatus.Builder builderForValue) { + if (concurrentRequestsBuilder_ == null) { + concurrentRequests_ = builderForValue.build(); + onChanged(); + } else { + concurrentRequestsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public Builder mergeConcurrentRequests(com.google.analytics.data.v1beta.QuotaStatus value) { + if (concurrentRequestsBuilder_ == null) { + if (concurrentRequests_ != null) { + concurrentRequests_ = + com.google.analytics.data.v1beta.QuotaStatus.newBuilder(concurrentRequests_) + .mergeFrom(value) + .buildPartial(); + } else { + concurrentRequests_ = value; + } + onChanged(); + } else { + concurrentRequestsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public Builder clearConcurrentRequests() { + if (concurrentRequestsBuilder_ == null) { + concurrentRequests_ = null; + onChanged(); + } else { + concurrentRequests_ = null; + concurrentRequestsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public com.google.analytics.data.v1beta.QuotaStatus.Builder getConcurrentRequestsBuilder() { + + onChanged(); + return getConcurrentRequestsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder getConcurrentRequestsOrBuilder() { + if (concurrentRequestsBuilder_ != null) { + return concurrentRequestsBuilder_.getMessageOrBuilder(); + } else { + return concurrentRequests_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : concurrentRequests_; + } + } + /** + * + * + *
+     * Standard Analytics Properties can send up to 10 concurrent requests;
+     * Analytics 360 Properties can use up to 50 concurrent requests.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + getConcurrentRequestsFieldBuilder() { + if (concurrentRequestsBuilder_ == null) { + concurrentRequestsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder>( + getConcurrentRequests(), getParentForChildren(), isClean()); + concurrentRequests_ = null; + } + return concurrentRequestsBuilder_; + } + + private com.google.analytics.data.v1beta.QuotaStatus serverErrorsPerProjectPerHour_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + serverErrorsPerProjectPerHourBuilder_; + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * + * @return Whether the serverErrorsPerProjectPerHour field is set. + */ + public boolean hasServerErrorsPerProjectPerHour() { + return serverErrorsPerProjectPerHourBuilder_ != null + || serverErrorsPerProjectPerHour_ != null; + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * + * @return The serverErrorsPerProjectPerHour. + */ + public com.google.analytics.data.v1beta.QuotaStatus getServerErrorsPerProjectPerHour() { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + return serverErrorsPerProjectPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : serverErrorsPerProjectPerHour_; + } else { + return serverErrorsPerProjectPerHourBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public Builder setServerErrorsPerProjectPerHour( + com.google.analytics.data.v1beta.QuotaStatus value) { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serverErrorsPerProjectPerHour_ = value; + onChanged(); + } else { + serverErrorsPerProjectPerHourBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public Builder setServerErrorsPerProjectPerHour( + com.google.analytics.data.v1beta.QuotaStatus.Builder builderForValue) { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + serverErrorsPerProjectPerHour_ = builderForValue.build(); + onChanged(); + } else { + serverErrorsPerProjectPerHourBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public Builder mergeServerErrorsPerProjectPerHour( + com.google.analytics.data.v1beta.QuotaStatus value) { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + if (serverErrorsPerProjectPerHour_ != null) { + serverErrorsPerProjectPerHour_ = + com.google.analytics.data.v1beta.QuotaStatus.newBuilder( + serverErrorsPerProjectPerHour_) + .mergeFrom(value) + .buildPartial(); + } else { + serverErrorsPerProjectPerHour_ = value; + } + onChanged(); + } else { + serverErrorsPerProjectPerHourBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public Builder clearServerErrorsPerProjectPerHour() { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + serverErrorsPerProjectPerHour_ = null; + onChanged(); + } else { + serverErrorsPerProjectPerHour_ = null; + serverErrorsPerProjectPerHourBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public com.google.analytics.data.v1beta.QuotaStatus.Builder + getServerErrorsPerProjectPerHourBuilder() { + + onChanged(); + return getServerErrorsPerProjectPerHourFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + public com.google.analytics.data.v1beta.QuotaStatusOrBuilder + getServerErrorsPerProjectPerHourOrBuilder() { + if (serverErrorsPerProjectPerHourBuilder_ != null) { + return serverErrorsPerProjectPerHourBuilder_.getMessageOrBuilder(); + } else { + return serverErrorsPerProjectPerHour_ == null + ? com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance() + : serverErrorsPerProjectPerHour_; + } + } + /** + * + * + *
+     * Standard Analytics Properties and cloud project pairs can have up to 10
+     * server errors per hour; Analytics 360 Properties and cloud project pairs
+     * can have up to 50 server errors per hour.
+     * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder> + getServerErrorsPerProjectPerHourFieldBuilder() { + if (serverErrorsPerProjectPerHourBuilder_ == null) { + serverErrorsPerProjectPerHourBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.QuotaStatus, + com.google.analytics.data.v1beta.QuotaStatus.Builder, + com.google.analytics.data.v1beta.QuotaStatusOrBuilder>( + getServerErrorsPerProjectPerHour(), getParentForChildren(), isClean()); + serverErrorsPerProjectPerHour_ = null; + } + return serverErrorsPerProjectPerHourBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.PropertyQuota) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.PropertyQuota) + private static final com.google.analytics.data.v1beta.PropertyQuota DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.PropertyQuota(); + } + + public static com.google.analytics.data.v1beta.PropertyQuota getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PropertyQuota parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PropertyQuota(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuotaOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuotaOrBuilder.java new file mode 100644 index 00000000..f4dcc95c --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuotaOrBuilder.java @@ -0,0 +1,189 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface PropertyQuotaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.PropertyQuota) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return Whether the tokensPerDay field is set. + */ + boolean hasTokensPerDay(); + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + * + * @return The tokensPerDay. + */ + com.google.analytics.data.v1beta.QuotaStatus getTokensPerDay(); + /** + * + * + *
+   * Standard Analytics Properties can use up to 25,000 tokens per day;
+   * Analytics 360 Properties can use 250,000 tokens per day. Most requests
+   * consume fewer than 10 tokens.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_day = 1; + */ + com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerDayOrBuilder(); + + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return Whether the tokensPerHour field is set. + */ + boolean hasTokensPerHour(); + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + * + * @return The tokensPerHour. + */ + com.google.analytics.data.v1beta.QuotaStatus getTokensPerHour(); + /** + * + * + *
+   * Standard Analytics Properties can use up to 5,000 tokens per hour;
+   * Analytics 360 Properties can use 50,000 tokens per hour. An API request
+   * consumes a single number of tokens, and that number is deducted from both
+   * the hourly and daily quotas.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus tokens_per_hour = 2; + */ + com.google.analytics.data.v1beta.QuotaStatusOrBuilder getTokensPerHourOrBuilder(); + + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return Whether the concurrentRequests field is set. + */ + boolean hasConcurrentRequests(); + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + * + * @return The concurrentRequests. + */ + com.google.analytics.data.v1beta.QuotaStatus getConcurrentRequests(); + /** + * + * + *
+   * Standard Analytics Properties can send up to 10 concurrent requests;
+   * Analytics 360 Properties can use up to 50 concurrent requests.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus concurrent_requests = 3; + */ + com.google.analytics.data.v1beta.QuotaStatusOrBuilder getConcurrentRequestsOrBuilder(); + + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * @return Whether the serverErrorsPerProjectPerHour field is set. + */ + boolean hasServerErrorsPerProjectPerHour(); + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + * + * @return The serverErrorsPerProjectPerHour. + */ + com.google.analytics.data.v1beta.QuotaStatus getServerErrorsPerProjectPerHour(); + /** + * + * + *
+   * Standard Analytics Properties and cloud project pairs can have up to 10
+   * server errors per hour; Analytics 360 Properties and cloud project pairs
+   * can have up to 50 server errors per hour.
+   * 
+ * + * .google.analytics.data.v1beta.QuotaStatus server_errors_per_project_per_hour = 4; + */ + com.google.analytics.data.v1beta.QuotaStatusOrBuilder getServerErrorsPerProjectPerHourOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatus.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatus.java new file mode 100644 index 00000000..87c4fd23 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatus.java @@ -0,0 +1,634 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Current state for a particular quota group.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.QuotaStatus} + */ +public final class QuotaStatus extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.QuotaStatus) + QuotaStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuotaStatus.newBuilder() to construct. + private QuotaStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QuotaStatus() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QuotaStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QuotaStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + consumed_ = input.readInt32(); + break; + } + case 16: + { + remaining_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_QuotaStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.QuotaStatus.class, + com.google.analytics.data.v1beta.QuotaStatus.Builder.class); + } + + public static final int CONSUMED_FIELD_NUMBER = 1; + private int consumed_; + /** + * + * + *
+   * Quota consumed by this request.
+   * 
+ * + * int32 consumed = 1; + * + * @return The consumed. + */ + @java.lang.Override + public int getConsumed() { + return consumed_; + } + + public static final int REMAINING_FIELD_NUMBER = 2; + private int remaining_; + /** + * + * + *
+   * Quota remaining after this request.
+   * 
+ * + * int32 remaining = 2; + * + * @return The remaining. + */ + @java.lang.Override + public int getRemaining() { + return remaining_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (consumed_ != 0) { + output.writeInt32(1, consumed_); + } + if (remaining_ != 0) { + output.writeInt32(2, remaining_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (consumed_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, consumed_); + } + if (remaining_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, remaining_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.QuotaStatus)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.QuotaStatus other = + (com.google.analytics.data.v1beta.QuotaStatus) obj; + + if (getConsumed() != other.getConsumed()) return false; + if (getRemaining() != other.getRemaining()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONSUMED_FIELD_NUMBER; + hash = (53 * hash) + getConsumed(); + hash = (37 * hash) + REMAINING_FIELD_NUMBER; + hash = (53 * hash) + getRemaining(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.QuotaStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.QuotaStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Current state for a particular quota group.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.QuotaStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.QuotaStatus) + com.google.analytics.data.v1beta.QuotaStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_QuotaStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.QuotaStatus.class, + com.google.analytics.data.v1beta.QuotaStatus.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.QuotaStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + consumed_ = 0; + + remaining_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus build() { + com.google.analytics.data.v1beta.QuotaStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus buildPartial() { + com.google.analytics.data.v1beta.QuotaStatus result = + new com.google.analytics.data.v1beta.QuotaStatus(this); + result.consumed_ = consumed_; + result.remaining_ = remaining_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.QuotaStatus) { + return mergeFrom((com.google.analytics.data.v1beta.QuotaStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.QuotaStatus other) { + if (other == com.google.analytics.data.v1beta.QuotaStatus.getDefaultInstance()) return this; + if (other.getConsumed() != 0) { + setConsumed(other.getConsumed()); + } + if (other.getRemaining() != 0) { + setRemaining(other.getRemaining()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.QuotaStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.QuotaStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int consumed_; + /** + * + * + *
+     * Quota consumed by this request.
+     * 
+ * + * int32 consumed = 1; + * + * @return The consumed. + */ + @java.lang.Override + public int getConsumed() { + return consumed_; + } + /** + * + * + *
+     * Quota consumed by this request.
+     * 
+ * + * int32 consumed = 1; + * + * @param value The consumed to set. + * @return This builder for chaining. + */ + public Builder setConsumed(int value) { + + consumed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Quota consumed by this request.
+     * 
+ * + * int32 consumed = 1; + * + * @return This builder for chaining. + */ + public Builder clearConsumed() { + + consumed_ = 0; + onChanged(); + return this; + } + + private int remaining_; + /** + * + * + *
+     * Quota remaining after this request.
+     * 
+ * + * int32 remaining = 2; + * + * @return The remaining. + */ + @java.lang.Override + public int getRemaining() { + return remaining_; + } + /** + * + * + *
+     * Quota remaining after this request.
+     * 
+ * + * int32 remaining = 2; + * + * @param value The remaining to set. + * @return This builder for chaining. + */ + public Builder setRemaining(int value) { + + remaining_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Quota remaining after this request.
+     * 
+ * + * int32 remaining = 2; + * + * @return This builder for chaining. + */ + public Builder clearRemaining() { + + remaining_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.QuotaStatus) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.QuotaStatus) + private static final com.google.analytics.data.v1beta.QuotaStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.QuotaStatus(); + } + + public static com.google.analytics.data.v1beta.QuotaStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QuotaStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuotaStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.QuotaStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatusOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatusOrBuilder.java new file mode 100644 index 00000000..e507a751 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatusOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface QuotaStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.QuotaStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Quota consumed by this request.
+   * 
+ * + * int32 consumed = 1; + * + * @return The consumed. + */ + int getConsumed(); + + /** + * + * + *
+   * Quota remaining after this request.
+   * 
+ * + * int32 remaining = 2; + * + * @return The remaining. + */ + int getRemaining(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ReportingApiProto.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ReportingApiProto.java new file mode 100644 index 00000000..a76aea79 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ReportingApiProto.java @@ -0,0 +1,640 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public final class ReportingApiProto { + private ReportingApiProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DateRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DateRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Dimension_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Dimension_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Metric_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Metric_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_FilterExpression_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_FilterExpression_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_FilterExpressionList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Filter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Filter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Filter_StringFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Filter_InListFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Filter_NumericFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_OrderBy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_OrderBy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Pivot_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Pivot_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_CohortSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_CohortSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Cohort_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Cohort_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_CohortsRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_CohortsRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_CohortReportSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_ResponseMetaData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionHeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_MetricHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_MetricHeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_PivotHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_PivotHeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_PivotDimensionHeader_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_Row_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_Row_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_MetricValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_MetricValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_NumericValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_NumericValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_PropertyQuota_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_QuotaStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_DimensionMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_data_v1beta_MetricMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/analytics/data/v1beta/data.prot" + + "o\022\034google.analytics.data.v1beta\"?\n\tDateR" + + "ange\022\022\n\nstart_date\030\001 \001(\t\022\020\n\010end_date\030\002 \001" + + "(\t\022\014\n\004name\030\003 \001(\t\"j\n\tDimension\022\014\n\004name\030\001 " + + "\001(\t\022O\n\024dimension_expression\030\002 \001(\01321.goog" + + "le.analytics.data.v1beta.DimensionExpres" + + "sion\"\246\003\n\023DimensionExpression\022V\n\nlower_ca" + + "se\030\004 \001(\0132@.google.analytics.data.v1beta." + + "DimensionExpression.CaseExpressionH\000\022V\n\n" + + "upper_case\030\005 \001(\0132@.google.analytics.data" + + ".v1beta.DimensionExpression.CaseExpressi" + + "onH\000\022^\n\013concatenate\030\006 \001(\0132G.google.analy" + + "tics.data.v1beta.DimensionExpression.Con" + + "catenateExpressionH\000\032(\n\016CaseExpression\022\026" + + "\n\016dimension_name\030\001 \001(\t\032C\n\025ConcatenateExp" + + "ression\022\027\n\017dimension_names\030\001 \003(\t\022\021\n\tdeli" + + "miter\030\002 \001(\tB\020\n\016one_expression\"=\n\006Metric\022" + + "\014\n\004name\030\001 \001(\t\022\022\n\nexpression\030\002 \001(\t\022\021\n\tinv" + + "isible\030\003 \001(\010\"\255\002\n\020FilterExpression\022G\n\tand" + + "_group\030\001 \001(\01322.google.analytics.data.v1b" + + "eta.FilterExpressionListH\000\022F\n\010or_group\030\002" + + " \001(\01322.google.analytics.data.v1beta.Filt" + + "erExpressionListH\000\022H\n\016not_expression\030\003 \001" + + "(\0132..google.analytics.data.v1beta.Filter" + + "ExpressionH\000\0226\n\006filter\030\004 \001(\0132$.google.an" + + "alytics.data.v1beta.FilterH\000B\006\n\004expr\"[\n\024" + + "FilterExpressionList\022C\n\013expressions\030\001 \003(" + + "\0132..google.analytics.data.v1beta.FilterE" + + "xpression\"\336\010\n\006Filter\022\022\n\nfield_name\030\001 \001(\t" + + "\022J\n\rstring_filter\030\003 \001(\01321.google.analyti" + + "cs.data.v1beta.Filter.StringFilterH\000\022K\n\016" + + "in_list_filter\030\004 \001(\01321.google.analytics." + + "data.v1beta.Filter.InListFilterH\000\022L\n\016num" + + "eric_filter\030\005 \001(\01322.google.analytics.dat" + + "a.v1beta.Filter.NumericFilterH\000\022L\n\016betwe" + + "en_filter\030\006 \001(\01322.google.analytics.data." + + "v1beta.Filter.BetweenFilterH\000\032\216\002\n\014String" + + "Filter\022O\n\nmatch_type\030\001 \001(\0162;.google.anal" + + "ytics.data.v1beta.Filter.StringFilter.Ma" + + "tchType\022\r\n\005value\030\002 \001(\t\022\026\n\016case_sensitive" + + "\030\003 \001(\010\"\205\001\n\tMatchType\022\032\n\026MATCH_TYPE_UNSPE" + + "CIFIED\020\000\022\t\n\005EXACT\020\001\022\017\n\013BEGINS_WITH\020\002\022\r\n\t" + + "ENDS_WITH\020\003\022\014\n\010CONTAINS\020\004\022\017\n\013FULL_REGEXP" + + "\020\005\022\022\n\016PARTIAL_REGEXP\020\006\0326\n\014InListFilter\022\016" + + "\n\006values\030\001 \003(\t\022\026\n\016case_sensitive\030\002 \001(\010\032\243" + + "\002\n\rNumericFilter\022O\n\toperation\030\001 \001(\0162<.go" + + "ogle.analytics.data.v1beta.Filter.Numeri" + + "cFilter.Operation\0229\n\005value\030\002 \001(\0132*.googl" + + "e.analytics.data.v1beta.NumericValue\"\205\001\n" + + "\tOperation\022\031\n\025OPERATION_UNSPECIFIED\020\000\022\t\n" + + "\005EQUAL\020\001\022\r\n\tLESS_THAN\020\002\022\026\n\022LESS_THAN_OR_" + + "EQUAL\020\003\022\020\n\014GREATER_THAN\020\004\022\031\n\025GREATER_THA" + + "N_OR_EQUAL\020\005\032\215\001\n\rBetweenFilter\022>\n\nfrom_v" + + "alue\030\001 \001(\0132*.google.analytics.data.v1bet" + + "a.NumericValue\022<\n\010to_value\030\002 \001(\0132*.googl" + + "e.analytics.data.v1beta.NumericValueB\014\n\n" + + "one_filter\"\332\005\n\007OrderBy\022E\n\006metric\030\001 \001(\01323" + + ".google.analytics.data.v1beta.OrderBy.Me" + + "tricOrderByH\000\022K\n\tdimension\030\002 \001(\01326.googl" + + "e.analytics.data.v1beta.OrderBy.Dimensio" + + "nOrderByH\000\022C\n\005pivot\030\003 \001(\01322.google.analy" + + "tics.data.v1beta.OrderBy.PivotOrderByH\000\022" + + "\014\n\004desc\030\004 \001(\010\032$\n\rMetricOrderBy\022\023\n\013metric" + + "_name\030\001 \001(\t\032\353\001\n\020DimensionOrderBy\022\026\n\016dime" + + "nsion_name\030\001 \001(\t\022T\n\norder_type\030\002 \001(\0162@.g" + + "oogle.analytics.data.v1beta.OrderBy.Dime" + + "nsionOrderBy.OrderType\"i\n\tOrderType\022\032\n\026O" + + "RDER_TYPE_UNSPECIFIED\020\000\022\020\n\014ALPHANUMERIC\020" + + "\001\022!\n\035CASE_INSENSITIVE_ALPHANUMERIC\020\002\022\013\n\007" + + "NUMERIC\020\003\032\303\001\n\014PivotOrderBy\022\023\n\013metric_nam" + + "e\030\001 \001(\t\022[\n\020pivot_selections\030\002 \003(\0132A.goog" + + "le.analytics.data.v1beta.OrderBy.PivotOr" + + "derBy.PivotSelection\032A\n\016PivotSelection\022\026" + + "\n\016dimension_name\030\001 \001(\t\022\027\n\017dimension_valu" + + "e\030\002 \001(\tB\016\n\014one_order_by\"\303\001\n\005Pivot\022\023\n\013fie" + + "ld_names\030\001 \003(\t\0228\n\torder_bys\030\002 \003(\0132%.goog" + + "le.analytics.data.v1beta.OrderBy\022\016\n\006offs" + + "et\030\003 \001(\003\022\r\n\005limit\030\004 \001(\003\022L\n\023metric_aggreg" + + "ations\030\005 \003(\0162/.google.analytics.data.v1b" + + "eta.MetricAggregation\"\332\001\n\nCohortSpec\0225\n\007" + + "cohorts\030\001 \003(\0132$.google.analytics.data.v1" + + "beta.Cohort\022A\n\rcohorts_range\030\002 \001(\0132*.goo" + + "gle.analytics.data.v1beta.CohortsRange\022R" + + "\n\026cohort_report_settings\030\003 \001(\01322.google." + + "analytics.data.v1beta.CohortReportSettin" + + "gs\"f\n\006Cohort\022\014\n\004name\030\001 \001(\t\022\021\n\tdimension\030" + + "\002 \001(\t\022;\n\ndate_range\030\003 \001(\0132\'.google.analy" + + "tics.data.v1beta.DateRange\"\325\001\n\014CohortsRa" + + "nge\022K\n\013granularity\030\001 \001(\01626.google.analyt" + + "ics.data.v1beta.CohortsRange.Granularity" + + "\022\024\n\014start_offset\030\002 \001(\005\022\022\n\nend_offset\030\003 \001" + + "(\005\"N\n\013Granularity\022\033\n\027GRANULARITY_UNSPECI" + + "FIED\020\000\022\t\n\005DAILY\020\001\022\n\n\006WEEKLY\020\002\022\013\n\007MONTHLY" + + "\020\003\"*\n\024CohortReportSettings\022\022\n\naccumulate" + + "\030\001 \001(\010\"4\n\020ResponseMetaData\022 \n\030data_loss_" + + "from_other_row\030\003 \001(\010\"\037\n\017DimensionHeader\022" + + "\014\n\004name\030\001 \001(\t\"T\n\014MetricHeader\022\014\n\004name\030\001 " + + "\001(\t\0226\n\004type\030\002 \001(\0162(.google.analytics.dat" + + "a.v1beta.MetricType\"u\n\013PivotHeader\022S\n\027pi" + + "vot_dimension_headers\030\001 \003(\01322.google.ana" + + "lytics.data.v1beta.PivotDimensionHeader\022" + + "\021\n\trow_count\030\002 \001(\005\"^\n\024PivotDimensionHead" + + "er\022F\n\020dimension_values\030\001 \003(\0132,.google.an" + + "alytics.data.v1beta.DimensionValue\"\217\001\n\003R" + + "ow\022F\n\020dimension_values\030\001 \003(\0132,.google.an" + + "alytics.data.v1beta.DimensionValue\022@\n\rme" + + "tric_values\030\002 \003(\0132).google.analytics.dat" + + "a.v1beta.MetricValue\".\n\016DimensionValue\022\017" + + "\n\005value\030\001 \001(\tH\000B\013\n\tone_value\"+\n\013MetricVa" + + "lue\022\017\n\005value\030\004 \001(\tH\000B\013\n\tone_value\"J\n\014Num" + + "ericValue\022\025\n\013int64_value\030\001 \001(\003H\000\022\026\n\014doub" + + "le_value\030\002 \001(\001H\000B\013\n\tone_value\"\265\002\n\rProper" + + "tyQuota\022A\n\016tokens_per_day\030\001 \001(\0132).google" + + ".analytics.data.v1beta.QuotaStatus\022B\n\017to" + + "kens_per_hour\030\002 \001(\0132).google.analytics.d" + + "ata.v1beta.QuotaStatus\022F\n\023concurrent_req" + + "uests\030\003 \001(\0132).google.analytics.data.v1be" + + "ta.QuotaStatus\022U\n\"server_errors_per_proj" + + "ect_per_hour\030\004 \001(\0132).google.analytics.da" + + "ta.v1beta.QuotaStatus\"2\n\013QuotaStatus\022\020\n\010" + + "consumed\030\001 \001(\005\022\021\n\tremaining\030\002 \001(\005\"\204\001\n\021Di" + + "mensionMetadata\022\020\n\010api_name\030\001 \001(\t\022\017\n\007ui_" + + "name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\034\n\024depre" + + "cated_api_names\030\004 \003(\t\022\031\n\021custom_definiti" + + "on\030\005 \001(\010\"\315\001\n\016MetricMetadata\022\020\n\010api_name\030" + + "\001 \001(\t\022\017\n\007ui_name\030\002 \001(\t\022\023\n\013description\030\003 " + + "\001(\t\022\034\n\024deprecated_api_names\030\004 \003(\t\0226\n\004typ" + + "e\030\005 \001(\0162(.google.analytics.data.v1beta.M" + + "etricType\022\022\n\nexpression\030\006 \001(\t\022\031\n\021custom_" + + "definition\030\007 \001(\010*g\n\021MetricAggregation\022\"\n" + + "\036METRIC_AGGREGATION_UNSPECIFIED\020\000\022\t\n\005TOT" + + "AL\020\001\022\013\n\007MINIMUM\020\005\022\013\n\007MAXIMUM\020\006\022\t\n\005COUNT\020" + + "\004*\201\002\n\nMetricType\022\033\n\027METRIC_TYPE_UNSPECIF" + + "IED\020\000\022\020\n\014TYPE_INTEGER\020\001\022\016\n\nTYPE_FLOAT\020\002\022" + + "\020\n\014TYPE_SECONDS\020\004\022\025\n\021TYPE_MILLISECONDS\020\005" + + "\022\020\n\014TYPE_MINUTES\020\006\022\016\n\nTYPE_HOURS\020\007\022\021\n\rTY" + + "PE_STANDARD\020\010\022\021\n\rTYPE_CURRENCY\020\t\022\r\n\tTYPE" + + "_FEET\020\n\022\016\n\nTYPE_MILES\020\013\022\017\n\013TYPE_METERS\020\014" + + "\022\023\n\017TYPE_KILOMETERS\020\rBy\n com.google.anal" + + "ytics.data.v1betaB\021ReportingApiProtoP\001Z@" + + "google.golang.org/genproto/googleapis/an" + + "alytics/data/v1beta;datab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_analytics_data_v1beta_DateRange_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_analytics_data_v1beta_DateRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DateRange_descriptor, + new java.lang.String[] { + "StartDate", "EndDate", "Name", + }); + internal_static_google_analytics_data_v1beta_Dimension_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_analytics_data_v1beta_Dimension_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Dimension_descriptor, + new java.lang.String[] { + "Name", "DimensionExpression", + }); + internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_analytics_data_v1beta_DimensionExpression_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor, + new java.lang.String[] { + "LowerCase", "UpperCase", "Concatenate", "OneExpression", + }); + internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor = + internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor + .getNestedTypes() + .get(0); + internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionExpression_CaseExpression_descriptor, + new java.lang.String[] { + "DimensionName", + }); + internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor = + internal_static_google_analytics_data_v1beta_DimensionExpression_descriptor + .getNestedTypes() + .get(1); + internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionExpression_ConcatenateExpression_descriptor, + new java.lang.String[] { + "DimensionNames", "Delimiter", + }); + internal_static_google_analytics_data_v1beta_Metric_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_analytics_data_v1beta_Metric_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Metric_descriptor, + new java.lang.String[] { + "Name", "Expression", "Invisible", + }); + internal_static_google_analytics_data_v1beta_FilterExpression_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_analytics_data_v1beta_FilterExpression_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_FilterExpression_descriptor, + new java.lang.String[] { + "AndGroup", "OrGroup", "NotExpression", "Filter", "Expr", + }); + internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_analytics_data_v1beta_FilterExpressionList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_FilterExpressionList_descriptor, + new java.lang.String[] { + "Expressions", + }); + internal_static_google_analytics_data_v1beta_Filter_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_analytics_data_v1beta_Filter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Filter_descriptor, + new java.lang.String[] { + "FieldName", + "StringFilter", + "InListFilter", + "NumericFilter", + "BetweenFilter", + "OneFilter", + }); + internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor = + internal_static_google_analytics_data_v1beta_Filter_descriptor.getNestedTypes().get(0); + internal_static_google_analytics_data_v1beta_Filter_StringFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Filter_StringFilter_descriptor, + new java.lang.String[] { + "MatchType", "Value", "CaseSensitive", + }); + internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor = + internal_static_google_analytics_data_v1beta_Filter_descriptor.getNestedTypes().get(1); + internal_static_google_analytics_data_v1beta_Filter_InListFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Filter_InListFilter_descriptor, + new java.lang.String[] { + "Values", "CaseSensitive", + }); + internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor = + internal_static_google_analytics_data_v1beta_Filter_descriptor.getNestedTypes().get(2); + internal_static_google_analytics_data_v1beta_Filter_NumericFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Filter_NumericFilter_descriptor, + new java.lang.String[] { + "Operation", "Value", + }); + internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor = + internal_static_google_analytics_data_v1beta_Filter_descriptor.getNestedTypes().get(3); + internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Filter_BetweenFilter_descriptor, + new java.lang.String[] { + "FromValue", "ToValue", + }); + internal_static_google_analytics_data_v1beta_OrderBy_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_analytics_data_v1beta_OrderBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_OrderBy_descriptor, + new java.lang.String[] { + "Metric", "Dimension", "Pivot", "Desc", "OneOrderBy", + }); + internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor = + internal_static_google_analytics_data_v1beta_OrderBy_descriptor.getNestedTypes().get(0); + internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_OrderBy_MetricOrderBy_descriptor, + new java.lang.String[] { + "MetricName", + }); + internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor = + internal_static_google_analytics_data_v1beta_OrderBy_descriptor.getNestedTypes().get(1); + internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_OrderBy_DimensionOrderBy_descriptor, + new java.lang.String[] { + "DimensionName", "OrderType", + }); + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor = + internal_static_google_analytics_data_v1beta_OrderBy_descriptor.getNestedTypes().get(2); + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor, + new java.lang.String[] { + "MetricName", "PivotSelections", + }); + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor = + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_OrderBy_PivotOrderBy_PivotSelection_descriptor, + new java.lang.String[] { + "DimensionName", "DimensionValue", + }); + internal_static_google_analytics_data_v1beta_Pivot_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_analytics_data_v1beta_Pivot_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Pivot_descriptor, + new java.lang.String[] { + "FieldNames", "OrderBys", "Offset", "Limit", "MetricAggregations", + }); + internal_static_google_analytics_data_v1beta_CohortSpec_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_analytics_data_v1beta_CohortSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_CohortSpec_descriptor, + new java.lang.String[] { + "Cohorts", "CohortsRange", "CohortReportSettings", + }); + internal_static_google_analytics_data_v1beta_Cohort_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_analytics_data_v1beta_Cohort_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Cohort_descriptor, + new java.lang.String[] { + "Name", "Dimension", "DateRange", + }); + internal_static_google_analytics_data_v1beta_CohortsRange_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_analytics_data_v1beta_CohortsRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_CohortsRange_descriptor, + new java.lang.String[] { + "Granularity", "StartOffset", "EndOffset", + }); + internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_analytics_data_v1beta_CohortReportSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_CohortReportSettings_descriptor, + new java.lang.String[] { + "Accumulate", + }); + internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_analytics_data_v1beta_ResponseMetaData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor, + new java.lang.String[] { + "DataLossFromOtherRow", + }); + internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_analytics_data_v1beta_DimensionHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionHeader_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_analytics_data_v1beta_MetricHeader_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_analytics_data_v1beta_MetricHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_MetricHeader_descriptor, + new java.lang.String[] { + "Name", "Type", + }); + internal_static_google_analytics_data_v1beta_PivotHeader_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_analytics_data_v1beta_PivotHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_PivotHeader_descriptor, + new java.lang.String[] { + "PivotDimensionHeaders", "RowCount", + }); + internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_analytics_data_v1beta_PivotDimensionHeader_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_PivotDimensionHeader_descriptor, + new java.lang.String[] { + "DimensionValues", + }); + internal_static_google_analytics_data_v1beta_Row_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_analytics_data_v1beta_Row_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_Row_descriptor, + new java.lang.String[] { + "DimensionValues", "MetricValues", + }); + internal_static_google_analytics_data_v1beta_DimensionValue_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_analytics_data_v1beta_DimensionValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionValue_descriptor, + new java.lang.String[] { + "Value", "OneValue", + }); + internal_static_google_analytics_data_v1beta_MetricValue_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_analytics_data_v1beta_MetricValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_MetricValue_descriptor, + new java.lang.String[] { + "Value", "OneValue", + }); + internal_static_google_analytics_data_v1beta_NumericValue_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_analytics_data_v1beta_NumericValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_NumericValue_descriptor, + new java.lang.String[] { + "Int64Value", "DoubleValue", "OneValue", + }); + internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_analytics_data_v1beta_PropertyQuota_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_PropertyQuota_descriptor, + new java.lang.String[] { + "TokensPerDay", + "TokensPerHour", + "ConcurrentRequests", + "ServerErrorsPerProjectPerHour", + }); + internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_analytics_data_v1beta_QuotaStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_QuotaStatus_descriptor, + new java.lang.String[] { + "Consumed", "Remaining", + }); + internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_analytics_data_v1beta_DimensionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_DimensionMetadata_descriptor, + new java.lang.String[] { + "ApiName", "UiName", "Description", "DeprecatedApiNames", "CustomDefinition", + }); + internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_analytics_data_v1beta_MetricMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_data_v1beta_MetricMetadata_descriptor, + new java.lang.String[] { + "ApiName", + "UiName", + "Description", + "DeprecatedApiNames", + "Type", + "Expression", + "CustomDefinition", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaData.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaData.java new file mode 100644 index 00000000..3b549245 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaData.java @@ -0,0 +1,550 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Response's metadata carrying additional information about the report content.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.ResponseMetaData} + */ +public final class ResponseMetaData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.ResponseMetaData) + ResponseMetaDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResponseMetaData.newBuilder() to construct. + private ResponseMetaData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResponseMetaData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResponseMetaData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResponseMetaData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: + { + dataLossFromOtherRow_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_ResponseMetaData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.ResponseMetaData.class, + com.google.analytics.data.v1beta.ResponseMetaData.Builder.class); + } + + public static final int DATA_LOSS_FROM_OTHER_ROW_FIELD_NUMBER = 3; + private boolean dataLossFromOtherRow_; + /** + * + * + *
+   * If true, indicates some buckets of dimension combinations are rolled into
+   * "(other)" row. This can happen for high cardinality reports.
+   * 
+ * + * bool data_loss_from_other_row = 3; + * + * @return The dataLossFromOtherRow. + */ + @java.lang.Override + public boolean getDataLossFromOtherRow() { + return dataLossFromOtherRow_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataLossFromOtherRow_ != false) { + output.writeBool(3, dataLossFromOtherRow_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataLossFromOtherRow_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dataLossFromOtherRow_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.ResponseMetaData)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.ResponseMetaData other = + (com.google.analytics.data.v1beta.ResponseMetaData) obj; + + if (getDataLossFromOtherRow() != other.getDataLossFromOtherRow()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_LOSS_FROM_OTHER_ROW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDataLossFromOtherRow()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.ResponseMetaData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response's metadata carrying additional information about the report content.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.ResponseMetaData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.ResponseMetaData) + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_ResponseMetaData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.ResponseMetaData.class, + com.google.analytics.data.v1beta.ResponseMetaData.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.ResponseMetaData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataLossFromOtherRow_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_ResponseMetaData_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData build() { + com.google.analytics.data.v1beta.ResponseMetaData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData buildPartial() { + com.google.analytics.data.v1beta.ResponseMetaData result = + new com.google.analytics.data.v1beta.ResponseMetaData(this); + result.dataLossFromOtherRow_ = dataLossFromOtherRow_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.ResponseMetaData) { + return mergeFrom((com.google.analytics.data.v1beta.ResponseMetaData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.ResponseMetaData other) { + if (other == com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance()) + return this; + if (other.getDataLossFromOtherRow() != false) { + setDataLossFromOtherRow(other.getDataLossFromOtherRow()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.ResponseMetaData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.ResponseMetaData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean dataLossFromOtherRow_; + /** + * + * + *
+     * If true, indicates some buckets of dimension combinations are rolled into
+     * "(other)" row. This can happen for high cardinality reports.
+     * 
+ * + * bool data_loss_from_other_row = 3; + * + * @return The dataLossFromOtherRow. + */ + @java.lang.Override + public boolean getDataLossFromOtherRow() { + return dataLossFromOtherRow_; + } + /** + * + * + *
+     * If true, indicates some buckets of dimension combinations are rolled into
+     * "(other)" row. This can happen for high cardinality reports.
+     * 
+ * + * bool data_loss_from_other_row = 3; + * + * @param value The dataLossFromOtherRow to set. + * @return This builder for chaining. + */ + public Builder setDataLossFromOtherRow(boolean value) { + + dataLossFromOtherRow_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, indicates some buckets of dimension combinations are rolled into
+     * "(other)" row. This can happen for high cardinality reports.
+     * 
+ * + * bool data_loss_from_other_row = 3; + * + * @return This builder for chaining. + */ + public Builder clearDataLossFromOtherRow() { + + dataLossFromOtherRow_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.ResponseMetaData) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.ResponseMetaData) + private static final com.google.analytics.data.v1beta.ResponseMetaData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.ResponseMetaData(); + } + + public static com.google.analytics.data.v1beta.ResponseMetaData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResponseMetaData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResponseMetaData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaDataOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaDataOrBuilder.java new file mode 100644 index 00000000..30d8d054 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaDataOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface ResponseMetaDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.ResponseMetaData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If true, indicates some buckets of dimension combinations are rolled into
+   * "(other)" row. This can happen for high cardinality reports.
+   * 
+ * + * bool data_loss_from_other_row = 3; + * + * @return The dataLossFromOtherRow. + */ + boolean getDataLossFromOtherRow(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Row.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Row.java new file mode 100644 index 00000000..d76dc002 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Row.java @@ -0,0 +1,1538 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * Report data for each row.
+ * For example if RunReportRequest contains:
+ * ```none
+ * "dimensions": [
+ *   {
+ *     "name": "eventName"
+ *   },
+ *   {
+ *     "name": "countryId"
+ *   }
+ * ],
+ * "metrics": [
+ *   {
+ *     "name": "eventCount"
+ *   }
+ * ]
+ * ```
+ * One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and
+ * 15 as the eventCount, would be:
+ * ```none
+ * "dimensionValues": [
+ *   {
+ *     "value": "in_app_purchase"
+ *   },
+ *   {
+ *     "value": "JP"
+ *   }
+ * ],
+ * "metricValues": [
+ *   {
+ *     "value": "15"
+ *   }
+ * ]
+ * ```
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Row} + */ +public final class Row extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.Row) + RowOrBuilder { + private static final long serialVersionUID = 0L; + // Use Row.newBuilder() to construct. + private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Row() { + dimensionValues_ = java.util.Collections.emptyList(); + metricValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Row(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Row( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensionValues_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionValue.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metricValues_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metricValues_.add( + input.readMessage( + com.google.analytics.data.v1beta.MetricValue.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = java.util.Collections.unmodifiableList(dimensionValues_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metricValues_ = java.util.Collections.unmodifiableList(metricValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Row_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Row_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Row.class, + com.google.analytics.data.v1beta.Row.Builder.class); + } + + public static final int DIMENSION_VALUES_FIELD_NUMBER = 1; + private java.util.List dimensionValues_; + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public java.util.List getDimensionValuesList() { + return dimensionValues_; + } + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public java.util.List + getDimensionValuesOrBuilderList() { + return dimensionValues_; + } + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public int getDimensionValuesCount() { + return dimensionValues_.size(); + } + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index) { + return dimensionValues_.get(index); + } + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder( + int index) { + return dimensionValues_.get(index); + } + + public static final int METRIC_VALUES_FIELD_NUMBER = 2; + private java.util.List metricValues_; + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + @java.lang.Override + public java.util.List getMetricValuesList() { + return metricValues_; + } + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + @java.lang.Override + public java.util.List + getMetricValuesOrBuilderList() { + return metricValues_; + } + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + @java.lang.Override + public int getMetricValuesCount() { + return metricValues_.size(); + } + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValue getMetricValues(int index) { + return metricValues_.get(index); + } + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricValueOrBuilder getMetricValuesOrBuilder(int index) { + return metricValues_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensionValues_.size(); i++) { + output.writeMessage(1, dimensionValues_.get(i)); + } + for (int i = 0; i < metricValues_.size(); i++) { + output.writeMessage(2, metricValues_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dimensionValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dimensionValues_.get(i)); + } + for (int i = 0; i < metricValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metricValues_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.Row)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.Row other = (com.google.analytics.data.v1beta.Row) obj; + + if (!getDimensionValuesList().equals(other.getDimensionValuesList())) return false; + if (!getMetricValuesList().equals(other.getMetricValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDimensionValuesCount() > 0) { + hash = (37 * hash) + DIMENSION_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getDimensionValuesList().hashCode(); + } + if (getMetricValuesCount() > 0) { + hash = (37 * hash) + METRIC_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getMetricValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.Row parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Row parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Row parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Row parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Row parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Row parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.Row parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.Row prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Report data for each row.
+   * For example if RunReportRequest contains:
+   * ```none
+   * "dimensions": [
+   *   {
+   *     "name": "eventName"
+   *   },
+   *   {
+   *     "name": "countryId"
+   *   }
+   * ],
+   * "metrics": [
+   *   {
+   *     "name": "eventCount"
+   *   }
+   * ]
+   * ```
+   * One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and
+   * 15 as the eventCount, would be:
+   * ```none
+   * "dimensionValues": [
+   *   {
+   *     "value": "in_app_purchase"
+   *   },
+   *   {
+   *     "value": "JP"
+   *   }
+   * ],
+   * "metricValues": [
+   *   {
+   *     "value": "15"
+   *   }
+   * ]
+   * ```
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.Row} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.Row) + com.google.analytics.data.v1beta.RowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Row_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Row_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.Row.class, + com.google.analytics.data.v1beta.Row.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.Row.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionValuesFieldBuilder(); + getMetricValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dimensionValuesBuilder_ == null) { + dimensionValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionValuesBuilder_.clear(); + } + if (metricValuesBuilder_ == null) { + metricValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricValuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.ReportingApiProto + .internal_static_google_analytics_data_v1beta_Row_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Row getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.Row.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Row build() { + com.google.analytics.data.v1beta.Row result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Row buildPartial() { + com.google.analytics.data.v1beta.Row result = new com.google.analytics.data.v1beta.Row(this); + int from_bitField0_ = bitField0_; + if (dimensionValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = java.util.Collections.unmodifiableList(dimensionValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensionValues_ = dimensionValues_; + } else { + result.dimensionValues_ = dimensionValuesBuilder_.build(); + } + if (metricValuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metricValues_ = java.util.Collections.unmodifiableList(metricValues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metricValues_ = metricValues_; + } else { + result.metricValues_ = metricValuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.Row) { + return mergeFrom((com.google.analytics.data.v1beta.Row) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.Row other) { + if (other == com.google.analytics.data.v1beta.Row.getDefaultInstance()) return this; + if (dimensionValuesBuilder_ == null) { + if (!other.dimensionValues_.isEmpty()) { + if (dimensionValues_.isEmpty()) { + dimensionValues_ = other.dimensionValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionValuesIsMutable(); + dimensionValues_.addAll(other.dimensionValues_); + } + onChanged(); + } + } else { + if (!other.dimensionValues_.isEmpty()) { + if (dimensionValuesBuilder_.isEmpty()) { + dimensionValuesBuilder_.dispose(); + dimensionValuesBuilder_ = null; + dimensionValues_ = other.dimensionValues_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionValuesFieldBuilder() + : null; + } else { + dimensionValuesBuilder_.addAllMessages(other.dimensionValues_); + } + } + } + if (metricValuesBuilder_ == null) { + if (!other.metricValues_.isEmpty()) { + if (metricValues_.isEmpty()) { + metricValues_ = other.metricValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricValuesIsMutable(); + metricValues_.addAll(other.metricValues_); + } + onChanged(); + } + } else { + if (!other.metricValues_.isEmpty()) { + if (metricValuesBuilder_.isEmpty()) { + metricValuesBuilder_.dispose(); + metricValuesBuilder_ = null; + metricValues_ = other.metricValues_; + bitField0_ = (bitField0_ & ~0x00000002); + metricValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricValuesFieldBuilder() + : null; + } else { + metricValuesBuilder_.addAllMessages(other.metricValues_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.Row parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.analytics.data.v1beta.Row) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dimensionValues_ = + java.util.Collections.emptyList(); + + private void ensureDimensionValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensionValues_ = + new java.util.ArrayList( + dimensionValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder> + dimensionValuesBuilder_; + + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesList() { + if (dimensionValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensionValues_); + } else { + return dimensionValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public int getDimensionValuesCount() { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.size(); + } else { + return dimensionValuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index) { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.get(index); + } else { + return dimensionValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder setDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.set(index, value); + onChanged(); + } else { + dimensionValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder setDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues(com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.add(value); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue value) { + if (dimensionValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionValuesIsMutable(); + dimensionValues_.add(index, value); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.add(builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addDimensionValues( + int index, com.google.analytics.data.v1beta.DimensionValue.Builder builderForValue) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder addAllDimensionValues( + java.lang.Iterable values) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionValues_); + onChanged(); + } else { + dimensionValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder clearDimensionValues() { + if (dimensionValuesBuilder_ == null) { + dimensionValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public Builder removeDimensionValues(int index) { + if (dimensionValuesBuilder_ == null) { + ensureDimensionValuesIsMutable(); + dimensionValues_.remove(index); + onChanged(); + } else { + dimensionValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder getDimensionValuesBuilder( + int index) { + return getDimensionValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder( + int index) { + if (dimensionValuesBuilder_ == null) { + return dimensionValues_.get(index); + } else { + return dimensionValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesOrBuilderList() { + if (dimensionValuesBuilder_ != null) { + return dimensionValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensionValues_); + } + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder addDimensionValuesBuilder() { + return getDimensionValuesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance()); + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public com.google.analytics.data.v1beta.DimensionValue.Builder addDimensionValuesBuilder( + int index) { + return getDimensionValuesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DimensionValue.getDefaultInstance()); + } + /** + * + * + *
+     * List of requested dimension values. In a PivotReport, dimension_values
+     * are only listed for dimensions included in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + public java.util.List + getDimensionValuesBuilderList() { + return getDimensionValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder> + getDimensionValuesFieldBuilder() { + if (dimensionValuesBuilder_ == null) { + dimensionValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionValue, + com.google.analytics.data.v1beta.DimensionValue.Builder, + com.google.analytics.data.v1beta.DimensionValueOrBuilder>( + dimensionValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dimensionValues_ = null; + } + return dimensionValuesBuilder_; + } + + private java.util.List metricValues_ = + java.util.Collections.emptyList(); + + private void ensureMetricValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metricValues_ = + new java.util.ArrayList(metricValues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricValue, + com.google.analytics.data.v1beta.MetricValue.Builder, + com.google.analytics.data.v1beta.MetricValueOrBuilder> + metricValuesBuilder_; + + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public java.util.List getMetricValuesList() { + if (metricValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricValues_); + } else { + return metricValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public int getMetricValuesCount() { + if (metricValuesBuilder_ == null) { + return metricValues_.size(); + } else { + return metricValuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public com.google.analytics.data.v1beta.MetricValue getMetricValues(int index) { + if (metricValuesBuilder_ == null) { + return metricValues_.get(index); + } else { + return metricValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder setMetricValues(int index, com.google.analytics.data.v1beta.MetricValue value) { + if (metricValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricValuesIsMutable(); + metricValues_.set(index, value); + onChanged(); + } else { + metricValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder setMetricValues( + int index, com.google.analytics.data.v1beta.MetricValue.Builder builderForValue) { + if (metricValuesBuilder_ == null) { + ensureMetricValuesIsMutable(); + metricValues_.set(index, builderForValue.build()); + onChanged(); + } else { + metricValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder addMetricValues(com.google.analytics.data.v1beta.MetricValue value) { + if (metricValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricValuesIsMutable(); + metricValues_.add(value); + onChanged(); + } else { + metricValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder addMetricValues(int index, com.google.analytics.data.v1beta.MetricValue value) { + if (metricValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricValuesIsMutable(); + metricValues_.add(index, value); + onChanged(); + } else { + metricValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder addMetricValues( + com.google.analytics.data.v1beta.MetricValue.Builder builderForValue) { + if (metricValuesBuilder_ == null) { + ensureMetricValuesIsMutable(); + metricValues_.add(builderForValue.build()); + onChanged(); + } else { + metricValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder addMetricValues( + int index, com.google.analytics.data.v1beta.MetricValue.Builder builderForValue) { + if (metricValuesBuilder_ == null) { + ensureMetricValuesIsMutable(); + metricValues_.add(index, builderForValue.build()); + onChanged(); + } else { + metricValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder addAllMetricValues( + java.lang.Iterable values) { + if (metricValuesBuilder_ == null) { + ensureMetricValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricValues_); + onChanged(); + } else { + metricValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder clearMetricValues() { + if (metricValuesBuilder_ == null) { + metricValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public Builder removeMetricValues(int index) { + if (metricValuesBuilder_ == null) { + ensureMetricValuesIsMutable(); + metricValues_.remove(index); + onChanged(); + } else { + metricValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public com.google.analytics.data.v1beta.MetricValue.Builder getMetricValuesBuilder(int index) { + return getMetricValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public com.google.analytics.data.v1beta.MetricValueOrBuilder getMetricValuesOrBuilder( + int index) { + if (metricValuesBuilder_ == null) { + return metricValues_.get(index); + } else { + return metricValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public java.util.List + getMetricValuesOrBuilderList() { + if (metricValuesBuilder_ != null) { + return metricValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricValues_); + } + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public com.google.analytics.data.v1beta.MetricValue.Builder addMetricValuesBuilder() { + return getMetricValuesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.MetricValue.getDefaultInstance()); + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public com.google.analytics.data.v1beta.MetricValue.Builder addMetricValuesBuilder(int index) { + return getMetricValuesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.MetricValue.getDefaultInstance()); + } + /** + * + * + *
+     * List of requested visible metric values.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + public java.util.List + getMetricValuesBuilderList() { + return getMetricValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricValue, + com.google.analytics.data.v1beta.MetricValue.Builder, + com.google.analytics.data.v1beta.MetricValueOrBuilder> + getMetricValuesFieldBuilder() { + if (metricValuesBuilder_ == null) { + metricValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricValue, + com.google.analytics.data.v1beta.MetricValue.Builder, + com.google.analytics.data.v1beta.MetricValueOrBuilder>( + metricValues_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metricValues_ = null; + } + return metricValuesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.Row) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.Row) + private static final com.google.analytics.data.v1beta.Row DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.Row(); + } + + public static com.google.analytics.data.v1beta.Row getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Row parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Row(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.Row getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RowOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RowOrBuilder.java new file mode 100644 index 00000000..9a277d48 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RowOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/data.proto + +package com.google.analytics.data.v1beta; + +public interface RowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.Row) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + java.util.List getDimensionValuesList(); + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + com.google.analytics.data.v1beta.DimensionValue getDimensionValues(int index); + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + int getDimensionValuesCount(); + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + java.util.List + getDimensionValuesOrBuilderList(); + /** + * + * + *
+   * List of requested dimension values. In a PivotReport, dimension_values
+   * are only listed for dimensions included in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionValue dimension_values = 1; + */ + com.google.analytics.data.v1beta.DimensionValueOrBuilder getDimensionValuesOrBuilder(int index); + + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + java.util.List getMetricValuesList(); + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + com.google.analytics.data.v1beta.MetricValue getMetricValues(int index); + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + int getMetricValuesCount(); + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + java.util.List + getMetricValuesOrBuilderList(); + /** + * + * + *
+   * List of requested visible metric values.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricValue metric_values = 2; + */ + com.google.analytics.data.v1beta.MetricValueOrBuilder getMetricValuesOrBuilder(int index); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequest.java new file mode 100644 index 00000000..853a98d7 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequest.java @@ -0,0 +1,4127 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The request to generate a pivot report.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunPivotReportRequest} + */ +public final class RunPivotReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunPivotReportRequest) + RunPivotReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunPivotReportRequest.newBuilder() to construct. + private RunPivotReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunPivotReportRequest() { + property_ = ""; + dimensions_ = java.util.Collections.emptyList(); + metrics_ = java.util.Collections.emptyList(); + dateRanges_ = java.util.Collections.emptyList(); + pivots_ = java.util.Collections.emptyList(); + currencyCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunPivotReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunPivotReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensions_.add( + input.readMessage( + com.google.analytics.data.v1beta.Dimension.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metrics_.add( + input.readMessage( + com.google.analytics.data.v1beta.Metric.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + dateRanges_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + dateRanges_.add( + input.readMessage( + com.google.analytics.data.v1beta.DateRange.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pivots_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + pivots_.add( + input.readMessage( + com.google.analytics.data.v1beta.Pivot.parser(), extensionRegistry)); + break; + } + case 50: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (dimensionFilter_ != null) { + subBuilder = dimensionFilter_.toBuilder(); + } + dimensionFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dimensionFilter_); + dimensionFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (metricFilter_ != null) { + subBuilder = metricFilter_.toBuilder(); + } + metricFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metricFilter_); + metricFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + currencyCode_ = s; + break; + } + case 74: + { + com.google.analytics.data.v1beta.CohortSpec.Builder subBuilder = null; + if (cohortSpec_ != null) { + subBuilder = cohortSpec_.toBuilder(); + } + cohortSpec_ = + input.readMessage( + com.google.analytics.data.v1beta.CohortSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cohortSpec_); + cohortSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + keepEmptyRows_ = input.readBool(); + break; + } + case 88: + { + returnPropertyQuota_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + dateRanges_ = java.util.Collections.unmodifiableList(dateRanges_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pivots_ = java.util.Collections.unmodifiableList(pivots_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunPivotReportRequest.class, + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSIONS_FIELD_NUMBER = 2; + private java.util.List dimensions_; + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List getDimensionsList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List + getDimensionsOrBuilderList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public int getDimensionsCount() { + return dimensions_.size(); + } + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + return dimensions_.get(index); + } + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + return dimensions_.get(index); + } + + public static final int METRICS_FIELD_NUMBER = 3; + private java.util.List metrics_; + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int DATE_RANGES_FIELD_NUMBER = 4; + private java.util.List dateRanges_; + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public java.util.List getDateRangesList() { + return dateRanges_; + } + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public java.util.List + getDateRangesOrBuilderList() { + return dateRanges_; + } + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public int getDateRangesCount() { + return dateRanges_.size(); + } + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange getDateRanges(int index) { + return dateRanges_.get(index); + } + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index) { + return dateRanges_.get(index); + } + + public static final int PIVOTS_FIELD_NUMBER = 5; + private java.util.List pivots_; + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + @java.lang.Override + public java.util.List getPivotsList() { + return pivots_; + } + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + @java.lang.Override + public java.util.List + getPivotsOrBuilderList() { + return pivots_; + } + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + @java.lang.Override + public int getPivotsCount() { + return pivots_.size(); + } + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Pivot getPivots(int index) { + return pivots_.get(index); + } + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PivotOrBuilder getPivotsOrBuilder(int index) { + return pivots_.get(index); + } + + public static final int DIMENSION_FILTER_FIELD_NUMBER = 6; + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return Whether the dimensionFilter field is set. + */ + @java.lang.Override + public boolean hasDimensionFilter() { + return dimensionFilter_ != null; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return The dimensionFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder() { + return getDimensionFilter(); + } + + public static final int METRIC_FILTER_FIELD_NUMBER = 7; + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return Whether the metricFilter field is set. + */ + @java.lang.Override + public boolean hasMetricFilter() { + return metricFilter_ != null; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return The metricFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + return getMetricFilter(); + } + + public static final int CURRENCY_CODE_FIELD_NUMBER = 8; + private volatile java.lang.Object currencyCode_; + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + @java.lang.Override + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } + } + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COHORT_SPEC_FIELD_NUMBER = 9; + private com.google.analytics.data.v1beta.CohortSpec cohortSpec_; + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return Whether the cohortSpec field is set. + */ + @java.lang.Override + public boolean hasCohortSpec() { + return cohortSpec_ != null; + } + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return The cohortSpec. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec getCohortSpec() { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder() { + return getCohortSpec(); + } + + public static final int KEEP_EMPTY_ROWS_FIELD_NUMBER = 10; + private boolean keepEmptyRows_; + /** + * + * + *
+   * If false or unspecified, each row with all metrics equal to 0 will not be
+   * returned. If true, these rows will be returned if they are not separately
+   * removed by a filter.
+   * 
+ * + * bool keep_empty_rows = 10; + * + * @return The keepEmptyRows. + */ + @java.lang.Override + public boolean getKeepEmptyRows() { + return keepEmptyRows_; + } + + public static final int RETURN_PROPERTY_QUOTA_FIELD_NUMBER = 11; + private boolean returnPropertyQuota_; + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 11; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + output.writeMessage(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(3, metrics_.get(i)); + } + for (int i = 0; i < dateRanges_.size(); i++) { + output.writeMessage(4, dateRanges_.get(i)); + } + for (int i = 0; i < pivots_.size(); i++) { + output.writeMessage(5, pivots_.get(i)); + } + if (dimensionFilter_ != null) { + output.writeMessage(6, getDimensionFilter()); + } + if (metricFilter_ != null) { + output.writeMessage(7, getMetricFilter()); + } + if (!getCurrencyCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, currencyCode_); + } + if (cohortSpec_ != null) { + output.writeMessage(9, getCohortSpec()); + } + if (keepEmptyRows_ != false) { + output.writeBool(10, keepEmptyRows_); + } + if (returnPropertyQuota_ != false) { + output.writeBool(11, returnPropertyQuota_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metrics_.get(i)); + } + for (int i = 0; i < dateRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, dateRanges_.get(i)); + } + for (int i = 0; i < pivots_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, pivots_.get(i)); + } + if (dimensionFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDimensionFilter()); + } + if (metricFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetricFilter()); + } + if (!getCurrencyCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, currencyCode_); + } + if (cohortSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCohortSpec()); + } + if (keepEmptyRows_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, keepEmptyRows_); + } + if (returnPropertyQuota_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnPropertyQuota_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunPivotReportRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunPivotReportRequest other = + (com.google.analytics.data.v1beta.RunPivotReportRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getDimensionsList().equals(other.getDimensionsList())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (!getDateRangesList().equals(other.getDateRangesList())) return false; + if (!getPivotsList().equals(other.getPivotsList())) return false; + if (hasDimensionFilter() != other.hasDimensionFilter()) return false; + if (hasDimensionFilter()) { + if (!getDimensionFilter().equals(other.getDimensionFilter())) return false; + } + if (hasMetricFilter() != other.hasMetricFilter()) return false; + if (hasMetricFilter()) { + if (!getMetricFilter().equals(other.getMetricFilter())) return false; + } + if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; + if (hasCohortSpec() != other.hasCohortSpec()) return false; + if (hasCohortSpec()) { + if (!getCohortSpec().equals(other.getCohortSpec())) return false; + } + if (getKeepEmptyRows() != other.getKeepEmptyRows()) return false; + if (getReturnPropertyQuota() != other.getReturnPropertyQuota()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getDimensionsCount() > 0) { + hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionsList().hashCode(); + } + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + if (getDateRangesCount() > 0) { + hash = (37 * hash) + DATE_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDateRangesList().hashCode(); + } + if (getPivotsCount() > 0) { + hash = (37 * hash) + PIVOTS_FIELD_NUMBER; + hash = (53 * hash) + getPivotsList().hashCode(); + } + if (hasDimensionFilter()) { + hash = (37 * hash) + DIMENSION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getDimensionFilter().hashCode(); + } + if (hasMetricFilter()) { + hash = (37 * hash) + METRIC_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getMetricFilter().hashCode(); + } + hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCurrencyCode().hashCode(); + if (hasCohortSpec()) { + hash = (37 * hash) + COHORT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getCohortSpec().hashCode(); + } + hash = (37 * hash) + KEEP_EMPTY_ROWS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getKeepEmptyRows()); + hash = (37 * hash) + RETURN_PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPropertyQuota()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.RunPivotReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to generate a pivot report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunPivotReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunPivotReportRequest) + com.google.analytics.data.v1beta.RunPivotReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunPivotReportRequest.class, + com.google.analytics.data.v1beta.RunPivotReportRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunPivotReportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionsFieldBuilder(); + getMetricsFieldBuilder(); + getDateRangesFieldBuilder(); + getPivotsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionsBuilder_.clear(); + } + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricsBuilder_.clear(); + } + if (dateRangesBuilder_ == null) { + dateRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + dateRangesBuilder_.clear(); + } + if (pivotsBuilder_ == null) { + pivots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + pivotsBuilder_.clear(); + } + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + currencyCode_ = ""; + + if (cohortSpecBuilder_ == null) { + cohortSpec_ = null; + } else { + cohortSpec_ = null; + cohortSpecBuilder_ = null; + } + keepEmptyRows_ = false; + + returnPropertyQuota_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunPivotReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequest build() { + com.google.analytics.data.v1beta.RunPivotReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequest buildPartial() { + com.google.analytics.data.v1beta.RunPivotReportRequest result = + new com.google.analytics.data.v1beta.RunPivotReportRequest(this); + int from_bitField0_ = bitField0_; + result.property_ = property_; + if (dimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensions_ = dimensions_; + } else { + result.dimensions_ = dimensionsBuilder_.build(); + } + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (dateRangesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + dateRanges_ = java.util.Collections.unmodifiableList(dateRanges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.dateRanges_ = dateRanges_; + } else { + result.dateRanges_ = dateRangesBuilder_.build(); + } + if (pivotsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + pivots_ = java.util.Collections.unmodifiableList(pivots_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.pivots_ = pivots_; + } else { + result.pivots_ = pivotsBuilder_.build(); + } + if (dimensionFilterBuilder_ == null) { + result.dimensionFilter_ = dimensionFilter_; + } else { + result.dimensionFilter_ = dimensionFilterBuilder_.build(); + } + if (metricFilterBuilder_ == null) { + result.metricFilter_ = metricFilter_; + } else { + result.metricFilter_ = metricFilterBuilder_.build(); + } + result.currencyCode_ = currencyCode_; + if (cohortSpecBuilder_ == null) { + result.cohortSpec_ = cohortSpec_; + } else { + result.cohortSpec_ = cohortSpecBuilder_.build(); + } + result.keepEmptyRows_ = keepEmptyRows_; + result.returnPropertyQuota_ = returnPropertyQuota_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunPivotReportRequest) { + return mergeFrom((com.google.analytics.data.v1beta.RunPivotReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunPivotReportRequest other) { + if (other == com.google.analytics.data.v1beta.RunPivotReportRequest.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (dimensionsBuilder_ == null) { + if (!other.dimensions_.isEmpty()) { + if (dimensions_.isEmpty()) { + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionsIsMutable(); + dimensions_.addAll(other.dimensions_); + } + onChanged(); + } + } else { + if (!other.dimensions_.isEmpty()) { + if (dimensionsBuilder_.isEmpty()) { + dimensionsBuilder_.dispose(); + dimensionsBuilder_ = null; + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionsFieldBuilder() + : null; + } else { + dimensionsBuilder_.addAllMessages(other.dimensions_); + } + } + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (dateRangesBuilder_ == null) { + if (!other.dateRanges_.isEmpty()) { + if (dateRanges_.isEmpty()) { + dateRanges_ = other.dateRanges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDateRangesIsMutable(); + dateRanges_.addAll(other.dateRanges_); + } + onChanged(); + } + } else { + if (!other.dateRanges_.isEmpty()) { + if (dateRangesBuilder_.isEmpty()) { + dateRangesBuilder_.dispose(); + dateRangesBuilder_ = null; + dateRanges_ = other.dateRanges_; + bitField0_ = (bitField0_ & ~0x00000004); + dateRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDateRangesFieldBuilder() + : null; + } else { + dateRangesBuilder_.addAllMessages(other.dateRanges_); + } + } + } + if (pivotsBuilder_ == null) { + if (!other.pivots_.isEmpty()) { + if (pivots_.isEmpty()) { + pivots_ = other.pivots_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePivotsIsMutable(); + pivots_.addAll(other.pivots_); + } + onChanged(); + } + } else { + if (!other.pivots_.isEmpty()) { + if (pivotsBuilder_.isEmpty()) { + pivotsBuilder_.dispose(); + pivotsBuilder_ = null; + pivots_ = other.pivots_; + bitField0_ = (bitField0_ & ~0x00000008); + pivotsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPivotsFieldBuilder() + : null; + } else { + pivotsBuilder_.addAllMessages(other.pivots_); + } + } + } + if (other.hasDimensionFilter()) { + mergeDimensionFilter(other.getDimensionFilter()); + } + if (other.hasMetricFilter()) { + mergeMetricFilter(other.getMetricFilter()); + } + if (!other.getCurrencyCode().isEmpty()) { + currencyCode_ = other.currencyCode_; + onChanged(); + } + if (other.hasCohortSpec()) { + mergeCohortSpec(other.getCohortSpec()); + } + if (other.getKeepEmptyRows() != false) { + setKeepEmptyRows(other.getKeepEmptyRows()); + } + if (other.getReturnPropertyQuota() != false) { + setReturnPropertyQuota(other.getReturnPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunPivotReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunPivotReportRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List dimensions_ = + java.util.Collections.emptyList(); + + private void ensureDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensions_ = + new java.util.ArrayList(dimensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + dimensionsBuilder_; + + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List getDimensionsList() { + if (dimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensions_); + } else { + return dimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public int getDimensionsCount() { + if (dimensionsBuilder_ == null) { + return dimensions_.size(); + } else { + return dimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.set(index, value); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(index, value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addAllDimensions( + java.lang.Iterable values) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensions_); + onChanged(); + } else { + dimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder clearDimensions() { + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder removeDimensions(int index) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.remove(index); + onChanged(); + } else { + dimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder getDimensionsBuilder(int index) { + return getDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsOrBuilderList() { + if (dimensionsBuilder_ != null) { + return dimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensions_); + } + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder() { + return getDimensionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder(int index) { + return getDimensionsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested. All defined dimensions must be used by one of the
+     * following: dimension_expression, dimension_filter, pivots, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsBuilderList() { + return getDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + getDimensionsFieldBuilder() { + if (dimensionsBuilder_ == null) { + dimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder>( + dimensions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dimensions_ = null; + } + return dimensionsBuilder_; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested, at least one metric needs to be specified. All
+     * defined metrics must be used by one of the following: metric_expression,
+     * metric_filter, order_bys.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private java.util.List dateRanges_ = + java.util.Collections.emptyList(); + + private void ensureDateRangesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + dateRanges_ = + new java.util.ArrayList(dateRanges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + dateRangesBuilder_; + + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List getDateRangesList() { + if (dateRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dateRanges_); + } else { + return dateRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public int getDateRangesCount() { + if (dateRangesBuilder_ == null) { + return dateRanges_.size(); + } else { + return dateRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange getDateRanges(int index) { + if (dateRangesBuilder_ == null) { + return dateRanges_.get(index); + } else { + return dateRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder setDateRanges(int index, com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.set(index, value); + onChanged(); + } else { + dateRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder setDateRanges( + int index, com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges(com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.add(value); + onChanged(); + } else { + dateRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges(int index, com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.add(index, value); + onChanged(); + } else { + dateRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges( + com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.add(builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges( + int index, com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addAllDateRanges( + java.lang.Iterable values) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dateRanges_); + onChanged(); + } else { + dateRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder clearDateRanges() { + if (dateRangesBuilder_ == null) { + dateRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + dateRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder removeDateRanges(int index) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.remove(index); + onChanged(); + } else { + dateRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder getDateRangesBuilder(int index) { + return getDateRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index) { + if (dateRangesBuilder_ == null) { + return dateRanges_.get(index); + } else { + return dateRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List + getDateRangesOrBuilderList() { + if (dateRangesBuilder_ != null) { + return dateRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dateRanges_); + } + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder addDateRangesBuilder() { + return getDateRangesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DateRange.getDefaultInstance()); + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder addDateRangesBuilder(int index) { + return getDateRangesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DateRange.getDefaultInstance()); + } + /** + * + * + *
+     * The date range to retrieve event data for the report. If multiple date
+     * ranges are specified, event data from each date range is used in the
+     * report. A special dimension with field name "dateRange" can be included in
+     * a Pivot's field names; if included, the report compares between date
+     * ranges. In a cohort request, this `dateRanges` must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List + getDateRangesBuilderList() { + return getDateRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + getDateRangesFieldBuilder() { + if (dateRangesBuilder_ == null) { + dateRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder>( + dateRanges_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + dateRanges_ = null; + } + return dateRangesBuilder_; + } + + private java.util.List pivots_ = + java.util.Collections.emptyList(); + + private void ensurePivotsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + pivots_ = new java.util.ArrayList(pivots_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Pivot, + com.google.analytics.data.v1beta.Pivot.Builder, + com.google.analytics.data.v1beta.PivotOrBuilder> + pivotsBuilder_; + + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public java.util.List getPivotsList() { + if (pivotsBuilder_ == null) { + return java.util.Collections.unmodifiableList(pivots_); + } else { + return pivotsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public int getPivotsCount() { + if (pivotsBuilder_ == null) { + return pivots_.size(); + } else { + return pivotsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public com.google.analytics.data.v1beta.Pivot getPivots(int index) { + if (pivotsBuilder_ == null) { + return pivots_.get(index); + } else { + return pivotsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder setPivots(int index, com.google.analytics.data.v1beta.Pivot value) { + if (pivotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotsIsMutable(); + pivots_.set(index, value); + onChanged(); + } else { + pivotsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder setPivots( + int index, com.google.analytics.data.v1beta.Pivot.Builder builderForValue) { + if (pivotsBuilder_ == null) { + ensurePivotsIsMutable(); + pivots_.set(index, builderForValue.build()); + onChanged(); + } else { + pivotsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder addPivots(com.google.analytics.data.v1beta.Pivot value) { + if (pivotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotsIsMutable(); + pivots_.add(value); + onChanged(); + } else { + pivotsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder addPivots(int index, com.google.analytics.data.v1beta.Pivot value) { + if (pivotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotsIsMutable(); + pivots_.add(index, value); + onChanged(); + } else { + pivotsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder addPivots(com.google.analytics.data.v1beta.Pivot.Builder builderForValue) { + if (pivotsBuilder_ == null) { + ensurePivotsIsMutable(); + pivots_.add(builderForValue.build()); + onChanged(); + } else { + pivotsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder addPivots( + int index, com.google.analytics.data.v1beta.Pivot.Builder builderForValue) { + if (pivotsBuilder_ == null) { + ensurePivotsIsMutable(); + pivots_.add(index, builderForValue.build()); + onChanged(); + } else { + pivotsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder addAllPivots( + java.lang.Iterable values) { + if (pivotsBuilder_ == null) { + ensurePivotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pivots_); + onChanged(); + } else { + pivotsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder clearPivots() { + if (pivotsBuilder_ == null) { + pivots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + pivotsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public Builder removePivots(int index) { + if (pivotsBuilder_ == null) { + ensurePivotsIsMutable(); + pivots_.remove(index); + onChanged(); + } else { + pivotsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public com.google.analytics.data.v1beta.Pivot.Builder getPivotsBuilder(int index) { + return getPivotsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public com.google.analytics.data.v1beta.PivotOrBuilder getPivotsOrBuilder(int index) { + if (pivotsBuilder_ == null) { + return pivots_.get(index); + } else { + return pivotsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public java.util.List + getPivotsOrBuilderList() { + if (pivotsBuilder_ != null) { + return pivotsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pivots_); + } + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public com.google.analytics.data.v1beta.Pivot.Builder addPivotsBuilder() { + return getPivotsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Pivot.getDefaultInstance()); + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public com.google.analytics.data.v1beta.Pivot.Builder addPivotsBuilder(int index) { + return getPivotsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Pivot.getDefaultInstance()); + } + /** + * + * + *
+     * Describes the visual format of the report's dimensions in columns or rows.
+     * The union of the fieldNames (dimension names) in all pivots must be a
+     * subset of dimension names defined in Dimensions. No two pivots can share a
+     * dimension. A dimension is only visible if it appears in a pivot.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + public java.util.List getPivotsBuilderList() { + return getPivotsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Pivot, + com.google.analytics.data.v1beta.Pivot.Builder, + com.google.analytics.data.v1beta.PivotOrBuilder> + getPivotsFieldBuilder() { + if (pivotsBuilder_ == null) { + pivotsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Pivot, + com.google.analytics.data.v1beta.Pivot.Builder, + com.google.analytics.data.v1beta.PivotOrBuilder>( + pivots_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + pivots_ = null; + } + return pivotsBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + dimensionFilterBuilder_; + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return Whether the dimensionFilter field is set. + */ + public boolean hasDimensionFilter() { + return dimensionFilterBuilder_ != null || dimensionFilter_ != null; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return The dimensionFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } else { + return dimensionFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public Builder setDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dimensionFilter_ = value; + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public Builder setDimensionFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = builderForValue.build(); + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public Builder mergeDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (dimensionFilter_ != null) { + dimensionFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(dimensionFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + dimensionFilter_ = value; + } + onChanged(); + } else { + dimensionFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public Builder clearDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + onChanged(); + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getDimensionFilterBuilder() { + + onChanged(); + return getDimensionFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder + getDimensionFilterOrBuilder() { + if (dimensionFilterBuilder_ != null) { + return dimensionFilterBuilder_.getMessageOrBuilder(); + } else { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getDimensionFilterFieldBuilder() { + if (dimensionFilterBuilder_ == null) { + dimensionFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getDimensionFilter(), getParentForChildren(), isClean()); + dimensionFilter_ = null; + } + return dimensionFilterBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + metricFilterBuilder_; + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return Whether the metricFilter field is set. + */ + public boolean hasMetricFilter() { + return metricFilterBuilder_ != null || metricFilter_ != null; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return The metricFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + if (metricFilterBuilder_ == null) { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } else { + return metricFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public Builder setMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricFilter_ = value; + onChanged(); + } else { + metricFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public Builder setMetricFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (metricFilterBuilder_ == null) { + metricFilter_ = builderForValue.build(); + onChanged(); + } else { + metricFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public Builder mergeMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (metricFilter_ != null) { + metricFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(metricFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + metricFilter_ = value; + } + onChanged(); + } else { + metricFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public Builder clearMetricFilter() { + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + onChanged(); + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getMetricFilterBuilder() { + + onChanged(); + return getMetricFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + if (metricFilterBuilder_ != null) { + return metricFilterBuilder_.getMessageOrBuilder(); + } else { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getMetricFilterFieldBuilder() { + if (metricFilterBuilder_ == null) { + metricFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getMetricFilter(), getParentForChildren(), isClean()); + metricFilter_ = null; + } + return metricFilterBuilder_; + } + + private java.lang.Object currencyCode_ = ""; + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 8; + * + * @param value The currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + currencyCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 8; + * + * @return This builder for chaining. + */ + public Builder clearCurrencyCode() { + + currencyCode_ = getDefaultInstance().getCurrencyCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 8; + * + * @param value The bytes for currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + currencyCode_ = value; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.CohortSpec cohortSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder> + cohortSpecBuilder_; + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return Whether the cohortSpec field is set. + */ + public boolean hasCohortSpec() { + return cohortSpecBuilder_ != null || cohortSpec_ != null; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return The cohortSpec. + */ + public com.google.analytics.data.v1beta.CohortSpec getCohortSpec() { + if (cohortSpecBuilder_ == null) { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } else { + return cohortSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public Builder setCohortSpec(com.google.analytics.data.v1beta.CohortSpec value) { + if (cohortSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cohortSpec_ = value; + onChanged(); + } else { + cohortSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public Builder setCohortSpec( + com.google.analytics.data.v1beta.CohortSpec.Builder builderForValue) { + if (cohortSpecBuilder_ == null) { + cohortSpec_ = builderForValue.build(); + onChanged(); + } else { + cohortSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public Builder mergeCohortSpec(com.google.analytics.data.v1beta.CohortSpec value) { + if (cohortSpecBuilder_ == null) { + if (cohortSpec_ != null) { + cohortSpec_ = + com.google.analytics.data.v1beta.CohortSpec.newBuilder(cohortSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + cohortSpec_ = value; + } + onChanged(); + } else { + cohortSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public Builder clearCohortSpec() { + if (cohortSpecBuilder_ == null) { + cohortSpec_ = null; + onChanged(); + } else { + cohortSpec_ = null; + cohortSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public com.google.analytics.data.v1beta.CohortSpec.Builder getCohortSpecBuilder() { + + onChanged(); + return getCohortSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + public com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder() { + if (cohortSpecBuilder_ != null) { + return cohortSpecBuilder_.getMessageOrBuilder(); + } else { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder> + getCohortSpecFieldBuilder() { + if (cohortSpecBuilder_ == null) { + cohortSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder>( + getCohortSpec(), getParentForChildren(), isClean()); + cohortSpec_ = null; + } + return cohortSpecBuilder_; + } + + private boolean keepEmptyRows_; + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 10; + * + * @return The keepEmptyRows. + */ + @java.lang.Override + public boolean getKeepEmptyRows() { + return keepEmptyRows_; + } + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 10; + * + * @param value The keepEmptyRows to set. + * @return This builder for chaining. + */ + public Builder setKeepEmptyRows(boolean value) { + + keepEmptyRows_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 10; + * + * @return This builder for chaining. + */ + public Builder clearKeepEmptyRows() { + + keepEmptyRows_ = false; + onChanged(); + return this; + } + + private boolean returnPropertyQuota_; + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 11; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 11; + * + * @param value The returnPropertyQuota to set. + * @return This builder for chaining. + */ + public Builder setReturnPropertyQuota(boolean value) { + + returnPropertyQuota_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 11; + * + * @return This builder for chaining. + */ + public Builder clearReturnPropertyQuota() { + + returnPropertyQuota_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunPivotReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunPivotReportRequest) + private static final com.google.analytics.data.v1beta.RunPivotReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunPivotReportRequest(); + } + + public static com.google.analytics.data.v1beta.RunPivotReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunPivotReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunPivotReportRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequestOrBuilder.java new file mode 100644 index 00000000..7e9d0768 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequestOrBuilder.java @@ -0,0 +1,493 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunPivotReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunPivotReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List getDimensionsList(); + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.Dimension getDimensions(int index); + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + int getDimensionsCount(); + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List + getDimensionsOrBuilderList(); + /** + * + * + *
+   * The dimensions requested. All defined dimensions must be used by one of the
+   * following: dimension_expression, dimension_filter, pivots, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index); + + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.Metric getMetrics(int index); + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + int getMetricsCount(); + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * The metrics requested, at least one metric needs to be specified. All
+   * defined metrics must be used by one of the following: metric_expression,
+   * metric_filter, order_bys.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index); + + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + java.util.List getDateRangesList(); + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + com.google.analytics.data.v1beta.DateRange getDateRanges(int index); + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + int getDateRangesCount(); + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + java.util.List + getDateRangesOrBuilderList(); + /** + * + * + *
+   * The date range to retrieve event data for the report. If multiple date
+   * ranges are specified, event data from each date range is used in the
+   * report. A special dimension with field name "dateRange" can be included in
+   * a Pivot's field names; if included, the report compares between date
+   * ranges. In a cohort request, this `dateRanges` must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index); + + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + java.util.List getPivotsList(); + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + com.google.analytics.data.v1beta.Pivot getPivots(int index); + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + int getPivotsCount(); + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + java.util.List + getPivotsOrBuilderList(); + /** + * + * + *
+   * Describes the visual format of the report's dimensions in columns or rows.
+   * The union of the fieldNames (dimension names) in all pivots must be a
+   * subset of dimension names defined in Dimensions. No two pivots can share a
+   * dimension. A dimension is only visible if it appears in a pivot.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Pivot pivots = 5; + */ + com.google.analytics.data.v1beta.PivotOrBuilder getPivotsOrBuilder(int index); + + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return Whether the dimensionFilter field is set. + */ + boolean hasDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + * + * @return The dimensionFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 6; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder(); + + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return Whether the metricFilter field is set. + */ + boolean hasMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + * + * @return The metricFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 7; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder(); + + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 8; + * + * @return The currencyCode. + */ + java.lang.String getCurrencyCode(); + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 8; + * + * @return The bytes for currencyCode. + */ + com.google.protobuf.ByteString getCurrencyCodeBytes(); + + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return Whether the cohortSpec field is set. + */ + boolean hasCohortSpec(); + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + * + * @return The cohortSpec. + */ + com.google.analytics.data.v1beta.CohortSpec getCohortSpec(); + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 9; + */ + com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder(); + + /** + * + * + *
+   * If false or unspecified, each row with all metrics equal to 0 will not be
+   * returned. If true, these rows will be returned if they are not separately
+   * removed by a filter.
+   * 
+ * + * bool keep_empty_rows = 10; + * + * @return The keepEmptyRows. + */ + boolean getKeepEmptyRows(); + + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 11; + * + * @return The returnPropertyQuota. + */ + boolean getReturnPropertyQuota(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponse.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponse.java new file mode 100644 index 00000000..aa69985f --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponse.java @@ -0,0 +1,4336 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The response pivot report table corresponding to a pivot request.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunPivotReportResponse} + */ +public final class RunPivotReportResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunPivotReportResponse) + RunPivotReportResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunPivotReportResponse.newBuilder() to construct. + private RunPivotReportResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunPivotReportResponse() { + pivotHeaders_ = java.util.Collections.emptyList(); + dimensionHeaders_ = java.util.Collections.emptyList(); + metricHeaders_ = java.util.Collections.emptyList(); + rows_ = java.util.Collections.emptyList(); + aggregates_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunPivotReportResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunPivotReportResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pivotHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pivotHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.PivotHeader.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + dimensionHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionHeader.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + metricHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + metricHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.MetricHeader.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + rows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + rows_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + aggregates_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + aggregates_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 50: + { + com.google.analytics.data.v1beta.ResponseMetaData.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.analytics.data.v1beta.ResponseMetaData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.analytics.data.v1beta.PropertyQuota.Builder subBuilder = null; + if (propertyQuota_ != null) { + subBuilder = propertyQuota_.toBuilder(); + } + propertyQuota_ = + input.readMessage( + com.google.analytics.data.v1beta.PropertyQuota.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(propertyQuota_); + propertyQuota_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + pivotHeaders_ = java.util.Collections.unmodifiableList(pivotHeaders_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + aggregates_ = java.util.Collections.unmodifiableList(aggregates_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunPivotReportResponse.class, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder.class); + } + + public static final int PIVOT_HEADERS_FIELD_NUMBER = 1; + private java.util.List pivotHeaders_; + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + @java.lang.Override + public java.util.List getPivotHeadersList() { + return pivotHeaders_; + } + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + @java.lang.Override + public java.util.List + getPivotHeadersOrBuilderList() { + return pivotHeaders_; + } + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + @java.lang.Override + public int getPivotHeadersCount() { + return pivotHeaders_.size(); + } + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeader getPivotHeaders(int index) { + return pivotHeaders_.get(index); + } + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PivotHeaderOrBuilder getPivotHeadersOrBuilder(int index) { + return pivotHeaders_.get(index); + } + + public static final int DIMENSION_HEADERS_FIELD_NUMBER = 2; + private java.util.List dimensionHeaders_; + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersOrBuilderList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + @java.lang.Override + public int getDimensionHeadersCount() { + return dimensionHeaders_.size(); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + return dimensionHeaders_.get(index); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + return dimensionHeaders_.get(index); + } + + public static final int METRIC_HEADERS_FIELD_NUMBER = 3; + private java.util.List metricHeaders_; + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + @java.lang.Override + public java.util.List getMetricHeadersList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + @java.lang.Override + public java.util.List + getMetricHeadersOrBuilderList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + @java.lang.Override + public int getMetricHeadersCount() { + return metricHeaders_.size(); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + return metricHeaders_.get(index); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + return metricHeaders_.get(index); + } + + public static final int ROWS_FIELD_NUMBER = 4; + private java.util.List rows_; + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + @java.lang.Override + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getRows(int index) { + return rows_.get(index); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + return rows_.get(index); + } + + public static final int AGGREGATES_FIELD_NUMBER = 5; + private java.util.List aggregates_; + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + @java.lang.Override + public java.util.List getAggregatesList() { + return aggregates_; + } + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + @java.lang.Override + public java.util.List + getAggregatesOrBuilderList() { + return aggregates_; + } + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + @java.lang.Override + public int getAggregatesCount() { + return aggregates_.size(); + } + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getAggregates(int index) { + return aggregates_.get(index); + } + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getAggregatesOrBuilder(int index) { + return aggregates_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 6; + private com.google.analytics.data.v1beta.ResponseMetaData metadata_; + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData getMetadata() { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int PROPERTY_QUOTA_FIELD_NUMBER = 7; + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return Whether the propertyQuota field is set. + */ + @java.lang.Override + public boolean hasPropertyQuota() { + return propertyQuota_ != null; + } + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return The propertyQuota. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + return getPropertyQuota(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < pivotHeaders_.size(); i++) { + output.writeMessage(1, pivotHeaders_.get(i)); + } + for (int i = 0; i < dimensionHeaders_.size(); i++) { + output.writeMessage(2, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + output.writeMessage(3, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(4, rows_.get(i)); + } + for (int i = 0; i < aggregates_.size(); i++) { + output.writeMessage(5, aggregates_.get(i)); + } + if (metadata_ != null) { + output.writeMessage(6, getMetadata()); + } + if (propertyQuota_ != null) { + output.writeMessage(7, getPropertyQuota()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < pivotHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, pivotHeaders_.get(i)); + } + for (int i = 0; i < dimensionHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, rows_.get(i)); + } + for (int i = 0; i < aggregates_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, aggregates_.get(i)); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetadata()); + } + if (propertyQuota_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPropertyQuota()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunPivotReportResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunPivotReportResponse other = + (com.google.analytics.data.v1beta.RunPivotReportResponse) obj; + + if (!getPivotHeadersList().equals(other.getPivotHeadersList())) return false; + if (!getDimensionHeadersList().equals(other.getDimensionHeadersList())) return false; + if (!getMetricHeadersList().equals(other.getMetricHeadersList())) return false; + if (!getRowsList().equals(other.getRowsList())) return false; + if (!getAggregatesList().equals(other.getAggregatesList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasPropertyQuota() != other.hasPropertyQuota()) return false; + if (hasPropertyQuota()) { + if (!getPropertyQuota().equals(other.getPropertyQuota())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPivotHeadersCount() > 0) { + hash = (37 * hash) + PIVOT_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getPivotHeadersList().hashCode(); + } + if (getDimensionHeadersCount() > 0) { + hash = (37 * hash) + DIMENSION_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionHeadersList().hashCode(); + } + if (getMetricHeadersCount() > 0) { + hash = (37 * hash) + METRIC_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getMetricHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + if (getAggregatesCount() > 0) { + hash = (37 * hash) + AGGREGATES_FIELD_NUMBER; + hash = (53 * hash) + getAggregatesList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasPropertyQuota()) { + hash = (37 * hash) + PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + getPropertyQuota().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.RunPivotReportResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response pivot report table corresponding to a pivot request.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunPivotReportResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunPivotReportResponse) + com.google.analytics.data.v1beta.RunPivotReportResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunPivotReportResponse.class, + com.google.analytics.data.v1beta.RunPivotReportResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunPivotReportResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPivotHeadersFieldBuilder(); + getDimensionHeadersFieldBuilder(); + getMetricHeadersFieldBuilder(); + getRowsFieldBuilder(); + getAggregatesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pivotHeadersBuilder_ == null) { + pivotHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pivotHeadersBuilder_.clear(); + } + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + dimensionHeadersBuilder_.clear(); + } + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + metricHeadersBuilder_.clear(); + } + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + rowsBuilder_.clear(); + } + if (aggregatesBuilder_ == null) { + aggregates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + aggregatesBuilder_.clear(); + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunPivotReportResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponse getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunPivotReportResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponse build() { + com.google.analytics.data.v1beta.RunPivotReportResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponse buildPartial() { + com.google.analytics.data.v1beta.RunPivotReportResponse result = + new com.google.analytics.data.v1beta.RunPivotReportResponse(this); + int from_bitField0_ = bitField0_; + if (pivotHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pivotHeaders_ = java.util.Collections.unmodifiableList(pivotHeaders_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pivotHeaders_ = pivotHeaders_; + } else { + result.pivotHeaders_ = pivotHeadersBuilder_.build(); + } + if (dimensionHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.dimensionHeaders_ = dimensionHeaders_; + } else { + result.dimensionHeaders_ = dimensionHeadersBuilder_.build(); + } + if (metricHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.metricHeaders_ = metricHeaders_; + } else { + result.metricHeaders_ = metricHeadersBuilder_.build(); + } + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + if (aggregatesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + aggregates_ = java.util.Collections.unmodifiableList(aggregates_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.aggregates_ = aggregates_; + } else { + result.aggregates_ = aggregatesBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (propertyQuotaBuilder_ == null) { + result.propertyQuota_ = propertyQuota_; + } else { + result.propertyQuota_ = propertyQuotaBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunPivotReportResponse) { + return mergeFrom((com.google.analytics.data.v1beta.RunPivotReportResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunPivotReportResponse other) { + if (other == com.google.analytics.data.v1beta.RunPivotReportResponse.getDefaultInstance()) + return this; + if (pivotHeadersBuilder_ == null) { + if (!other.pivotHeaders_.isEmpty()) { + if (pivotHeaders_.isEmpty()) { + pivotHeaders_ = other.pivotHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePivotHeadersIsMutable(); + pivotHeaders_.addAll(other.pivotHeaders_); + } + onChanged(); + } + } else { + if (!other.pivotHeaders_.isEmpty()) { + if (pivotHeadersBuilder_.isEmpty()) { + pivotHeadersBuilder_.dispose(); + pivotHeadersBuilder_ = null; + pivotHeaders_ = other.pivotHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + pivotHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPivotHeadersFieldBuilder() + : null; + } else { + pivotHeadersBuilder_.addAllMessages(other.pivotHeaders_); + } + } + } + if (dimensionHeadersBuilder_ == null) { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeaders_.isEmpty()) { + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.addAll(other.dimensionHeaders_); + } + onChanged(); + } + } else { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeadersBuilder_.isEmpty()) { + dimensionHeadersBuilder_.dispose(); + dimensionHeadersBuilder_ = null; + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + dimensionHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionHeadersFieldBuilder() + : null; + } else { + dimensionHeadersBuilder_.addAllMessages(other.dimensionHeaders_); + } + } + } + if (metricHeadersBuilder_ == null) { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeaders_.isEmpty()) { + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMetricHeadersIsMutable(); + metricHeaders_.addAll(other.metricHeaders_); + } + onChanged(); + } + } else { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeadersBuilder_.isEmpty()) { + metricHeadersBuilder_.dispose(); + metricHeadersBuilder_ = null; + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000004); + metricHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricHeadersFieldBuilder() + : null; + } else { + metricHeadersBuilder_.addAllMessages(other.metricHeaders_); + } + } + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000008); + rowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowsFieldBuilder() + : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + if (aggregatesBuilder_ == null) { + if (!other.aggregates_.isEmpty()) { + if (aggregates_.isEmpty()) { + aggregates_ = other.aggregates_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAggregatesIsMutable(); + aggregates_.addAll(other.aggregates_); + } + onChanged(); + } + } else { + if (!other.aggregates_.isEmpty()) { + if (aggregatesBuilder_.isEmpty()) { + aggregatesBuilder_.dispose(); + aggregatesBuilder_ = null; + aggregates_ = other.aggregates_; + bitField0_ = (bitField0_ & ~0x00000010); + aggregatesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAggregatesFieldBuilder() + : null; + } else { + aggregatesBuilder_.addAllMessages(other.aggregates_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasPropertyQuota()) { + mergePropertyQuota(other.getPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunPivotReportResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunPivotReportResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List pivotHeaders_ = + java.util.Collections.emptyList(); + + private void ensurePivotHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pivotHeaders_ = + new java.util.ArrayList(pivotHeaders_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotHeader, + com.google.analytics.data.v1beta.PivotHeader.Builder, + com.google.analytics.data.v1beta.PivotHeaderOrBuilder> + pivotHeadersBuilder_; + + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public java.util.List getPivotHeadersList() { + if (pivotHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(pivotHeaders_); + } else { + return pivotHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public int getPivotHeadersCount() { + if (pivotHeadersBuilder_ == null) { + return pivotHeaders_.size(); + } else { + return pivotHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public com.google.analytics.data.v1beta.PivotHeader getPivotHeaders(int index) { + if (pivotHeadersBuilder_ == null) { + return pivotHeaders_.get(index); + } else { + return pivotHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder setPivotHeaders(int index, com.google.analytics.data.v1beta.PivotHeader value) { + if (pivotHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotHeadersIsMutable(); + pivotHeaders_.set(index, value); + onChanged(); + } else { + pivotHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder setPivotHeaders( + int index, com.google.analytics.data.v1beta.PivotHeader.Builder builderForValue) { + if (pivotHeadersBuilder_ == null) { + ensurePivotHeadersIsMutable(); + pivotHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + pivotHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder addPivotHeaders(com.google.analytics.data.v1beta.PivotHeader value) { + if (pivotHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotHeadersIsMutable(); + pivotHeaders_.add(value); + onChanged(); + } else { + pivotHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder addPivotHeaders(int index, com.google.analytics.data.v1beta.PivotHeader value) { + if (pivotHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePivotHeadersIsMutable(); + pivotHeaders_.add(index, value); + onChanged(); + } else { + pivotHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder addPivotHeaders( + com.google.analytics.data.v1beta.PivotHeader.Builder builderForValue) { + if (pivotHeadersBuilder_ == null) { + ensurePivotHeadersIsMutable(); + pivotHeaders_.add(builderForValue.build()); + onChanged(); + } else { + pivotHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder addPivotHeaders( + int index, com.google.analytics.data.v1beta.PivotHeader.Builder builderForValue) { + if (pivotHeadersBuilder_ == null) { + ensurePivotHeadersIsMutable(); + pivotHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + pivotHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder addAllPivotHeaders( + java.lang.Iterable values) { + if (pivotHeadersBuilder_ == null) { + ensurePivotHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pivotHeaders_); + onChanged(); + } else { + pivotHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder clearPivotHeaders() { + if (pivotHeadersBuilder_ == null) { + pivotHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pivotHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public Builder removePivotHeaders(int index) { + if (pivotHeadersBuilder_ == null) { + ensurePivotHeadersIsMutable(); + pivotHeaders_.remove(index); + onChanged(); + } else { + pivotHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public com.google.analytics.data.v1beta.PivotHeader.Builder getPivotHeadersBuilder(int index) { + return getPivotHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public com.google.analytics.data.v1beta.PivotHeaderOrBuilder getPivotHeadersOrBuilder( + int index) { + if (pivotHeadersBuilder_ == null) { + return pivotHeaders_.get(index); + } else { + return pivotHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public java.util.List + getPivotHeadersOrBuilderList() { + if (pivotHeadersBuilder_ != null) { + return pivotHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pivotHeaders_); + } + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public com.google.analytics.data.v1beta.PivotHeader.Builder addPivotHeadersBuilder() { + return getPivotHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.PivotHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public com.google.analytics.data.v1beta.PivotHeader.Builder addPivotHeadersBuilder(int index) { + return getPivotHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.PivotHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Summarizes the columns and rows created by a pivot. Each pivot in the
+     * request produces one header in the response. If we have a request like
+     * this:
+     *     "pivots": [{
+     *       "fieldNames": ["country",
+     *         "city"]
+     *     },
+     *     {
+     *       "fieldNames": "eventName"
+     *     }]
+     * We will have the following `pivotHeaders` in the response:
+     *     "pivotHeaders" : [{
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [
+     *            { "value": "United Kingdom" },
+     *            { "value": "London" }
+     *          ]
+     *       },
+     *       {
+     *         "dimensionValues": [
+     *         { "value": "Japan" },
+     *         { "value": "Osaka" }
+     *         ]
+     *       }]
+     *     },
+     *     {
+     *       "dimensionHeaders": [{
+     *         "dimensionValues": [{ "value": "session_start" }]
+     *       },
+     *       {
+     *         "dimensionValues": [{ "value": "scroll" }]
+     *       }]
+     *     }]
+     * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + public java.util.List + getPivotHeadersBuilderList() { + return getPivotHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotHeader, + com.google.analytics.data.v1beta.PivotHeader.Builder, + com.google.analytics.data.v1beta.PivotHeaderOrBuilder> + getPivotHeadersFieldBuilder() { + if (pivotHeadersBuilder_ == null) { + pivotHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.PivotHeader, + com.google.analytics.data.v1beta.PivotHeader.Builder, + com.google.analytics.data.v1beta.PivotHeaderOrBuilder>( + pivotHeaders_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pivotHeaders_ = null; + } + return pivotHeadersBuilder_; + } + + private java.util.List dimensionHeaders_ = + java.util.Collections.emptyList(); + + private void ensureDimensionHeadersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList( + dimensionHeaders_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + dimensionHeadersBuilder_; + + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public java.util.List + getDimensionHeadersList() { + if (dimensionHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } else { + return dimensionHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public int getDimensionHeadersCount() { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.size(); + } else { + return dimensionHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder addDimensionHeaders(com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder addDimensionHeaders( + com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder addAllDimensionHeaders( + java.lang.Iterable values) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionHeaders_); + onChanged(); + } else { + dimensionHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder clearDimensionHeaders() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + dimensionHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public Builder removeDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.remove(index); + onChanged(); + } else { + dimensionHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder getDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public java.util.List + getDimensionHeadersOrBuilderList() { + if (dimensionHeadersBuilder_ != null) { + return dimensionHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder() { + return getDimensionHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + public java.util.List + getDimensionHeadersBuilderList() { + return getDimensionHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + getDimensionHeadersFieldBuilder() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder>( + dimensionHeaders_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + dimensionHeaders_ = null; + } + return dimensionHeadersBuilder_; + } + + private java.util.List metricHeaders_ = + java.util.Collections.emptyList(); + + private void ensureMetricHeadersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + metricHeaders_ = + new java.util.ArrayList(metricHeaders_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + metricHeadersBuilder_; + + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public java.util.List getMetricHeadersList() { + if (metricHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricHeaders_); + } else { + return metricHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public int getMetricHeadersCount() { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.size(); + } else { + return metricHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, value); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder addMetricHeaders(com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder addMetricHeaders( + com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder addAllMetricHeaders( + java.lang.Iterable values) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricHeaders_); + onChanged(); + } else { + metricHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder clearMetricHeaders() { + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + metricHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public Builder removeMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.remove(index); + onChanged(); + } else { + metricHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder getMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public java.util.List + getMetricHeadersOrBuilderList() { + if (metricHeadersBuilder_ != null) { + return metricHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricHeaders_); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder() { + return getMetricHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + public java.util.List + getMetricHeadersBuilderList() { + return getMetricHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + getMetricHeadersFieldBuilder() { + if (metricHeadersBuilder_ == null) { + metricHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder>( + metricHeaders_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + metricHeaders_ = null; + } + return metricHeadersBuilder_; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + rowsBuilder_; + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public com.google.analytics.data.v1beta.Row getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder setRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder setRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder addRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder addRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder getRowsBuilder(int index) { + return getRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder() { + return getRowsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder(int index) { + return getRowsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + public java.util.List getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + rows_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + private java.util.List aggregates_ = + java.util.Collections.emptyList(); + + private void ensureAggregatesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + aggregates_ = new java.util.ArrayList(aggregates_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + aggregatesBuilder_; + + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public java.util.List getAggregatesList() { + if (aggregatesBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggregates_); + } else { + return aggregatesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public int getAggregatesCount() { + if (aggregatesBuilder_ == null) { + return aggregates_.size(); + } else { + return aggregatesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public com.google.analytics.data.v1beta.Row getAggregates(int index) { + if (aggregatesBuilder_ == null) { + return aggregates_.get(index); + } else { + return aggregatesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder setAggregates(int index, com.google.analytics.data.v1beta.Row value) { + if (aggregatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregatesIsMutable(); + aggregates_.set(index, value); + onChanged(); + } else { + aggregatesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder setAggregates( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (aggregatesBuilder_ == null) { + ensureAggregatesIsMutable(); + aggregates_.set(index, builderForValue.build()); + onChanged(); + } else { + aggregatesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder addAggregates(com.google.analytics.data.v1beta.Row value) { + if (aggregatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregatesIsMutable(); + aggregates_.add(value); + onChanged(); + } else { + aggregatesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder addAggregates(int index, com.google.analytics.data.v1beta.Row value) { + if (aggregatesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggregatesIsMutable(); + aggregates_.add(index, value); + onChanged(); + } else { + aggregatesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder addAggregates(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (aggregatesBuilder_ == null) { + ensureAggregatesIsMutable(); + aggregates_.add(builderForValue.build()); + onChanged(); + } else { + aggregatesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder addAggregates( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (aggregatesBuilder_ == null) { + ensureAggregatesIsMutable(); + aggregates_.add(index, builderForValue.build()); + onChanged(); + } else { + aggregatesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder addAllAggregates( + java.lang.Iterable values) { + if (aggregatesBuilder_ == null) { + ensureAggregatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, aggregates_); + onChanged(); + } else { + aggregatesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder clearAggregates() { + if (aggregatesBuilder_ == null) { + aggregates_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + aggregatesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public Builder removeAggregates(int index) { + if (aggregatesBuilder_ == null) { + ensureAggregatesIsMutable(); + aggregates_.remove(index); + onChanged(); + } else { + aggregatesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder getAggregatesBuilder(int index) { + return getAggregatesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getAggregatesOrBuilder(int index) { + if (aggregatesBuilder_ == null) { + return aggregates_.get(index); + } else { + return aggregatesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public java.util.List + getAggregatesOrBuilderList() { + if (aggregatesBuilder_ != null) { + return aggregatesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggregates_); + } + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addAggregatesBuilder() { + return getAggregatesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addAggregatesBuilder(int index) { + return getAggregatesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Aggregation of metric values. Can be totals, minimums, or maximums. The
+     * returned aggregations are controlled by the metric_aggregations in the
+     * pivot. The type of aggregation returned in each row is shown by the
+     * dimension_values which are set to "RESERVED_<MetricAggregation>".
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + public java.util.List getAggregatesBuilderList() { + return getAggregatesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getAggregatesFieldBuilder() { + if (aggregatesBuilder_ == null) { + aggregatesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + aggregates_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + aggregates_ = null; + } + return aggregatesBuilder_; + } + + private com.google.analytics.data.v1beta.ResponseMetaData metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return The metadata. + */ + public com.google.analytics.data.v1beta.ResponseMetaData getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public Builder setMetadata(com.google.analytics.data.v1beta.ResponseMetaData value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public Builder setMetadata( + com.google.analytics.data.v1beta.ResponseMetaData.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public Builder mergeMetadata(com.google.analytics.data.v1beta.ResponseMetaData value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.analytics.data.v1beta.ResponseMetaData.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public com.google.analytics.data.v1beta.ResponseMetaData.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + public com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + propertyQuotaBuilder_; + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return Whether the propertyQuota field is set. + */ + public boolean hasPropertyQuota() { + return propertyQuotaBuilder_ != null || propertyQuota_ != null; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return The propertyQuota. + */ + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } else { + return propertyQuotaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public Builder setPropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + propertyQuota_ = value; + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public Builder setPropertyQuota( + com.google.analytics.data.v1beta.PropertyQuota.Builder builderForValue) { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = builderForValue.build(); + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public Builder mergePropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (propertyQuota_ != null) { + propertyQuota_ = + com.google.analytics.data.v1beta.PropertyQuota.newBuilder(propertyQuota_) + .mergeFrom(value) + .buildPartial(); + } else { + propertyQuota_ = value; + } + onChanged(); + } else { + propertyQuotaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public Builder clearPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + onChanged(); + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public com.google.analytics.data.v1beta.PropertyQuota.Builder getPropertyQuotaBuilder() { + + onChanged(); + return getPropertyQuotaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + if (propertyQuotaBuilder_ != null) { + return propertyQuotaBuilder_.getMessageOrBuilder(); + } else { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + getPropertyQuotaFieldBuilder() { + if (propertyQuotaBuilder_ == null) { + propertyQuotaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder>( + getPropertyQuota(), getParentForChildren(), isClean()); + propertyQuota_ = null; + } + return propertyQuotaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunPivotReportResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunPivotReportResponse) + private static final com.google.analytics.data.v1beta.RunPivotReportResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunPivotReportResponse(); + } + + public static com.google.analytics.data.v1beta.RunPivotReportResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunPivotReportResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunPivotReportResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunPivotReportResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponseOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponseOrBuilder.java new file mode 100644 index 00000000..b6d04e49 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponseOrBuilder.java @@ -0,0 +1,539 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunPivotReportResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunPivotReportResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + java.util.List getPivotHeadersList(); + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + com.google.analytics.data.v1beta.PivotHeader getPivotHeaders(int index); + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + int getPivotHeadersCount(); + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + java.util.List + getPivotHeadersOrBuilderList(); + /** + * + * + *
+   * Summarizes the columns and rows created by a pivot. Each pivot in the
+   * request produces one header in the response. If we have a request like
+   * this:
+   *     "pivots": [{
+   *       "fieldNames": ["country",
+   *         "city"]
+   *     },
+   *     {
+   *       "fieldNames": "eventName"
+   *     }]
+   * We will have the following `pivotHeaders` in the response:
+   *     "pivotHeaders" : [{
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [
+   *            { "value": "United Kingdom" },
+   *            { "value": "London" }
+   *          ]
+   *       },
+   *       {
+   *         "dimensionValues": [
+   *         { "value": "Japan" },
+   *         { "value": "Osaka" }
+   *         ]
+   *       }]
+   *     },
+   *     {
+   *       "dimensionHeaders": [{
+   *         "dimensionValues": [{ "value": "session_start" }]
+   *       },
+   *       {
+   *         "dimensionValues": [{ "value": "scroll" }]
+   *       }]
+   *     }]
+   * 
+ * + * repeated .google.analytics.data.v1beta.PivotHeader pivot_headers = 1; + */ + com.google.analytics.data.v1beta.PivotHeaderOrBuilder getPivotHeadersOrBuilder(int index); + + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + java.util.List getDimensionHeadersList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + int getDimensionHeadersCount(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + java.util.List + getDimensionHeadersOrBuilderList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 2; + */ + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder(int index); + + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + java.util.List getMetricHeadersList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + int getMetricHeadersCount(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + java.util.List + getMetricHeadersOrBuilderList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 3; + */ + com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder(int index); + + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + java.util.List getRowsList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + com.google.analytics.data.v1beta.Row getRows(int index); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + int getRowsCount(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + java.util.List getRowsOrBuilderList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 4; + */ + com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index); + + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + java.util.List getAggregatesList(); + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + com.google.analytics.data.v1beta.Row getAggregates(int index); + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + int getAggregatesCount(); + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + java.util.List + getAggregatesOrBuilderList(); + /** + * + * + *
+   * Aggregation of metric values. Can be totals, minimums, or maximums. The
+   * returned aggregations are controlled by the metric_aggregations in the
+   * pivot. The type of aggregation returned in each row is shown by the
+   * dimension_values which are set to "RESERVED_<MetricAggregation>".
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row aggregates = 5; + */ + com.google.analytics.data.v1beta.RowOrBuilder getAggregatesOrBuilder(int index); + + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + * + * @return The metadata. + */ + com.google.analytics.data.v1beta.ResponseMetaData getMetadata(); + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 6; + */ + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return Whether the propertyQuota field is set. + */ + boolean hasPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + * + * @return The propertyQuota. + */ + com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 7; + */ + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequest.java new file mode 100644 index 00000000..d541834f --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequest.java @@ -0,0 +1,3372 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The request to generate a realtime report.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunRealtimeReportRequest} + */ +public final class RunRealtimeReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunRealtimeReportRequest) + RunRealtimeReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunRealtimeReportRequest.newBuilder() to construct. + private RunRealtimeReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunRealtimeReportRequest() { + property_ = ""; + dimensions_ = java.util.Collections.emptyList(); + metrics_ = java.util.Collections.emptyList(); + metricAggregations_ = java.util.Collections.emptyList(); + orderBys_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunRealtimeReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunRealtimeReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensions_.add( + input.readMessage( + com.google.analytics.data.v1beta.Dimension.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metrics_.add( + input.readMessage( + com.google.analytics.data.v1beta.Metric.parser(), extensionRegistry)); + break; + } + case 34: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (dimensionFilter_ != null) { + subBuilder = dimensionFilter_.toBuilder(); + } + dimensionFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dimensionFilter_); + dimensionFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (metricFilter_ != null) { + subBuilder = metricFilter_.toBuilder(); + } + metricFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metricFilter_); + metricFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + pageSize_ = input.readInt32(); + break; + } + case 56: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + metricAggregations_.add(rawValue); + break; + } + case 58: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + metricAggregations_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + orderBys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + orderBys_.add( + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.parser(), extensionRegistry)); + break; + } + case 72: + { + returnPropertyQuota_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunRealtimeReportRequest.class, + com.google.analytics.data.v1beta.RunRealtimeReportRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSIONS_FIELD_NUMBER = 2; + private java.util.List dimensions_; + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List getDimensionsList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List + getDimensionsOrBuilderList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public int getDimensionsCount() { + return dimensions_.size(); + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + return dimensions_.get(index); + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + return dimensions_.get(index); + } + + public static final int METRICS_FIELD_NUMBER = 3; + private java.util.List metrics_; + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int DIMENSION_FILTER_FIELD_NUMBER = 4; + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return Whether the dimensionFilter field is set. + */ + @java.lang.Override + public boolean hasDimensionFilter() { + return dimensionFilter_ != null; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return The dimensionFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder() { + return getDimensionFilter(); + } + + public static final int METRIC_FILTER_FIELD_NUMBER = 5; + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return Whether the metricFilter field is set. + */ + @java.lang.Override + public boolean hasMetricFilter() { + return metricFilter_ != null; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return The metricFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + return getMetricFilter(); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 6; + private int pageSize_; + /** + * + * + *
+   * Page size specifies maximum number of rows to return. If unspecified, up to
+   * 10,000 rows are returned. The API returns a maximum of 100,000 rows per
+   * request, no matter how many you ask for. Page size must be positive.
+   * The API can also return fewer rows than the requested `pageSize`, if there
+   * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination).
+   * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int METRIC_AGGREGATIONS_FIELD_NUMBER = 7; + private java.util.List metricAggregations_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation> + metricAggregations_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>() { + public com.google.analytics.data.v1beta.MetricAggregation convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricAggregation result = + com.google.analytics.data.v1beta.MetricAggregation.valueOf(from); + return result == null + ? com.google.analytics.data.v1beta.MetricAggregation.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return A list containing the metricAggregations. + */ + @java.lang.Override + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return The count of metricAggregations. + */ + @java.lang.Override + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + @java.lang.Override + public java.util.List getMetricAggregationsValueList() { + return metricAggregations_; + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + @java.lang.Override + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + + private int metricAggregationsMemoizedSerializedSize; + + public static final int ORDER_BYS_FIELD_NUMBER = 8; + private java.util.List orderBys_; + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + @java.lang.Override + public java.util.List getOrderBysList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + @java.lang.Override + public java.util.List + getOrderBysOrBuilderList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + @java.lang.Override + public int getOrderBysCount() { + return orderBys_.size(); + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + return orderBys_.get(index); + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + return orderBys_.get(index); + } + + public static final int RETURN_PROPERTY_QUOTA_FIELD_NUMBER = 9; + private boolean returnPropertyQuota_; + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 9; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + output.writeMessage(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(3, metrics_.get(i)); + } + if (dimensionFilter_ != null) { + output.writeMessage(4, getDimensionFilter()); + } + if (metricFilter_ != null) { + output.writeMessage(5, getMetricFilter()); + } + if (pageSize_ != 0) { + output.writeInt32(6, pageSize_); + } + if (getMetricAggregationsList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(metricAggregationsMemoizedSerializedSize); + } + for (int i = 0; i < metricAggregations_.size(); i++) { + output.writeEnumNoTag(metricAggregations_.get(i)); + } + for (int i = 0; i < orderBys_.size(); i++) { + output.writeMessage(8, orderBys_.get(i)); + } + if (returnPropertyQuota_ != false) { + output.writeBool(9, returnPropertyQuota_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metrics_.get(i)); + } + if (dimensionFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDimensionFilter()); + } + if (metricFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getMetricFilter()); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, pageSize_); + } + { + int dataSize = 0; + for (int i = 0; i < metricAggregations_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(metricAggregations_.get(i)); + } + size += dataSize; + if (!getMetricAggregationsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + metricAggregationsMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < orderBys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, orderBys_.get(i)); + } + if (returnPropertyQuota_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, returnPropertyQuota_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunRealtimeReportRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunRealtimeReportRequest other = + (com.google.analytics.data.v1beta.RunRealtimeReportRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getDimensionsList().equals(other.getDimensionsList())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (hasDimensionFilter() != other.hasDimensionFilter()) return false; + if (hasDimensionFilter()) { + if (!getDimensionFilter().equals(other.getDimensionFilter())) return false; + } + if (hasMetricFilter() != other.hasMetricFilter()) return false; + if (hasMetricFilter()) { + if (!getMetricFilter().equals(other.getMetricFilter())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!metricAggregations_.equals(other.metricAggregations_)) return false; + if (!getOrderBysList().equals(other.getOrderBysList())) return false; + if (getReturnPropertyQuota() != other.getReturnPropertyQuota()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getDimensionsCount() > 0) { + hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionsList().hashCode(); + } + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + if (hasDimensionFilter()) { + hash = (37 * hash) + DIMENSION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getDimensionFilter().hashCode(); + } + if (hasMetricFilter()) { + hash = (37 * hash) + METRIC_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getMetricFilter().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + if (getMetricAggregationsCount() > 0) { + hash = (37 * hash) + METRIC_AGGREGATIONS_FIELD_NUMBER; + hash = (53 * hash) + metricAggregations_.hashCode(); + } + if (getOrderBysCount() > 0) { + hash = (37 * hash) + ORDER_BYS_FIELD_NUMBER; + hash = (53 * hash) + getOrderBysList().hashCode(); + } + hash = (37 * hash) + RETURN_PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPropertyQuota()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.RunRealtimeReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to generate a realtime report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunRealtimeReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunRealtimeReportRequest) + com.google.analytics.data.v1beta.RunRealtimeReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunRealtimeReportRequest.class, + com.google.analytics.data.v1beta.RunRealtimeReportRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunRealtimeReportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionsFieldBuilder(); + getMetricsFieldBuilder(); + getOrderBysFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionsBuilder_.clear(); + } + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricsBuilder_.clear(); + } + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + pageSize_ = 0; + + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + orderBysBuilder_.clear(); + } + returnPropertyQuota_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunRealtimeReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportRequest build() { + com.google.analytics.data.v1beta.RunRealtimeReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportRequest buildPartial() { + com.google.analytics.data.v1beta.RunRealtimeReportRequest result = + new com.google.analytics.data.v1beta.RunRealtimeReportRequest(this); + int from_bitField0_ = bitField0_; + result.property_ = property_; + if (dimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensions_ = dimensions_; + } else { + result.dimensions_ = dimensionsBuilder_.build(); + } + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (dimensionFilterBuilder_ == null) { + result.dimensionFilter_ = dimensionFilter_; + } else { + result.dimensionFilter_ = dimensionFilterBuilder_.build(); + } + if (metricFilterBuilder_ == null) { + result.metricFilter_ = metricFilter_; + } else { + result.metricFilter_ = metricFilterBuilder_.build(); + } + result.pageSize_ = pageSize_; + if (((bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.metricAggregations_ = metricAggregations_; + if (orderBysBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.orderBys_ = orderBys_; + } else { + result.orderBys_ = orderBysBuilder_.build(); + } + result.returnPropertyQuota_ = returnPropertyQuota_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunRealtimeReportRequest) { + return mergeFrom((com.google.analytics.data.v1beta.RunRealtimeReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunRealtimeReportRequest other) { + if (other == com.google.analytics.data.v1beta.RunRealtimeReportRequest.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (dimensionsBuilder_ == null) { + if (!other.dimensions_.isEmpty()) { + if (dimensions_.isEmpty()) { + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionsIsMutable(); + dimensions_.addAll(other.dimensions_); + } + onChanged(); + } + } else { + if (!other.dimensions_.isEmpty()) { + if (dimensionsBuilder_.isEmpty()) { + dimensionsBuilder_.dispose(); + dimensionsBuilder_ = null; + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionsFieldBuilder() + : null; + } else { + dimensionsBuilder_.addAllMessages(other.dimensions_); + } + } + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (other.hasDimensionFilter()) { + mergeDimensionFilter(other.getDimensionFilter()); + } + if (other.hasMetricFilter()) { + mergeMetricFilter(other.getMetricFilter()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.metricAggregations_.isEmpty()) { + if (metricAggregations_.isEmpty()) { + metricAggregations_ = other.metricAggregations_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMetricAggregationsIsMutable(); + metricAggregations_.addAll(other.metricAggregations_); + } + onChanged(); + } + if (orderBysBuilder_ == null) { + if (!other.orderBys_.isEmpty()) { + if (orderBys_.isEmpty()) { + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureOrderBysIsMutable(); + orderBys_.addAll(other.orderBys_); + } + onChanged(); + } + } else { + if (!other.orderBys_.isEmpty()) { + if (orderBysBuilder_.isEmpty()) { + orderBysBuilder_.dispose(); + orderBysBuilder_ = null; + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000008); + orderBysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOrderBysFieldBuilder() + : null; + } else { + orderBysBuilder_.addAllMessages(other.orderBys_); + } + } + } + if (other.getReturnPropertyQuota() != false) { + setReturnPropertyQuota(other.getReturnPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunRealtimeReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunRealtimeReportRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List dimensions_ = + java.util.Collections.emptyList(); + + private void ensureDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensions_ = + new java.util.ArrayList(dimensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + dimensionsBuilder_; + + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List getDimensionsList() { + if (dimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensions_); + } else { + return dimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public int getDimensionsCount() { + if (dimensionsBuilder_ == null) { + return dimensions_.size(); + } else { + return dimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.set(index, value); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(index, value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addAllDimensions( + java.lang.Iterable values) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensions_); + onChanged(); + } else { + dimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder clearDimensions() { + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder removeDimensions(int index) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.remove(index); + onChanged(); + } else { + dimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder getDimensionsBuilder(int index) { + return getDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsOrBuilderList() { + if (dimensionsBuilder_ != null) { + return dimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensions_); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder() { + return getDimensionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder(int index) { + return getDimensionsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsBuilderList() { + return getDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + getDimensionsFieldBuilder() { + if (dimensionsBuilder_ == null) { + dimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder>( + dimensions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dimensions_ = null; + } + return dimensionsBuilder_; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + dimensionFilterBuilder_; + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return Whether the dimensionFilter field is set. + */ + public boolean hasDimensionFilter() { + return dimensionFilterBuilder_ != null || dimensionFilter_ != null; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return The dimensionFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } else { + return dimensionFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public Builder setDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dimensionFilter_ = value; + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public Builder setDimensionFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = builderForValue.build(); + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public Builder mergeDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (dimensionFilter_ != null) { + dimensionFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(dimensionFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + dimensionFilter_ = value; + } + onChanged(); + } else { + dimensionFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public Builder clearDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + onChanged(); + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getDimensionFilterBuilder() { + + onChanged(); + return getDimensionFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder + getDimensionFilterOrBuilder() { + if (dimensionFilterBuilder_ != null) { + return dimensionFilterBuilder_.getMessageOrBuilder(); + } else { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getDimensionFilterFieldBuilder() { + if (dimensionFilterBuilder_ == null) { + dimensionFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getDimensionFilter(), getParentForChildren(), isClean()); + dimensionFilter_ = null; + } + return dimensionFilterBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + metricFilterBuilder_; + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return Whether the metricFilter field is set. + */ + public boolean hasMetricFilter() { + return metricFilterBuilder_ != null || metricFilter_ != null; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return The metricFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + if (metricFilterBuilder_ == null) { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } else { + return metricFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public Builder setMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricFilter_ = value; + onChanged(); + } else { + metricFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public Builder setMetricFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (metricFilterBuilder_ == null) { + metricFilter_ = builderForValue.build(); + onChanged(); + } else { + metricFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public Builder mergeMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (metricFilter_ != null) { + metricFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(metricFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + metricFilter_ = value; + } + onChanged(); + } else { + metricFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public Builder clearMetricFilter() { + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + onChanged(); + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getMetricFilterBuilder() { + + onChanged(); + return getMetricFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + if (metricFilterBuilder_ != null) { + return metricFilterBuilder_.getMessageOrBuilder(); + } else { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getMetricFilterFieldBuilder() { + if (metricFilterBuilder_ == null) { + metricFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getMetricFilter(), getParentForChildren(), isClean()); + metricFilter_ = null; + } + return metricFilterBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Page size specifies maximum number of rows to return. If unspecified, up to
+     * 10,000 rows are returned. The API returns a maximum of 100,000 rows per
+     * request, no matter how many you ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination).
+     * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Page size specifies maximum number of rows to return. If unspecified, up to
+     * 10,000 rows are returned. The API returns a maximum of 100,000 rows per
+     * request, no matter how many you ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination).
+     * 
+ * + * int32 page_size = 6; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page size specifies maximum number of rows to return. If unspecified, up to
+     * 10,000 rows are returned. The API returns a maximum of 100,000 rows per
+     * request, no matter how many you ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination).
+     * 
+ * + * int32 page_size = 6; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.util.List metricAggregations_ = + java.util.Collections.emptyList(); + + private void ensureMetricAggregationsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + metricAggregations_ = new java.util.ArrayList(metricAggregations_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @return A list containing the metricAggregations. + */ + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @return The count of metricAggregations. + */ + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param index The index to set the value at. + * @param value The metricAggregations to set. + * @return This builder for chaining. + */ + public Builder setMetricAggregations( + int index, com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param value The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregations(com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param values The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregations( + java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (com.google.analytics.data.v1beta.MetricAggregation value : values) { + metricAggregations_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearMetricAggregations() { + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + public java.util.List getMetricAggregationsValueList() { + return java.util.Collections.unmodifiableList(metricAggregations_); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + * @return This builder for chaining. + */ + public Builder setMetricAggregationsValue(int index, int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param value The enum numeric value on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregationsValue(int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * + * @param values The enum numeric values on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregationsValue(java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (int value : values) { + metricAggregations_.add(value); + } + onChanged(); + return this; + } + + private java.util.List orderBys_ = + java.util.Collections.emptyList(); + + private void ensureOrderBysIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + orderBys_ = new java.util.ArrayList(orderBys_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + orderBysBuilder_; + + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public java.util.List getOrderBysList() { + if (orderBysBuilder_ == null) { + return java.util.Collections.unmodifiableList(orderBys_); + } else { + return orderBysBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public int getOrderBysCount() { + if (orderBysBuilder_ == null) { + return orderBys_.size(); + } else { + return orderBysBuilder_.getCount(); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder setOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.set(index, value); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder setOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.set(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(value); + onChanged(); + } else { + orderBysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder addOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(index, value); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder addOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder addAllOrderBys( + java.lang.Iterable values) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orderBys_); + onChanged(); + } else { + orderBysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder clearOrderBys() { + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + orderBysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public Builder removeOrderBys(int index) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.remove(index); + onChanged(); + } else { + orderBysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder getOrderBysBuilder(int index) { + return getOrderBysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public java.util.List + getOrderBysOrBuilderList() { + if (orderBysBuilder_ != null) { + return orderBysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orderBys_); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder() { + return getOrderBysFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder(int index) { + return getOrderBysFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + public java.util.List + getOrderBysBuilderList() { + return getOrderBysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + getOrderBysFieldBuilder() { + if (orderBysBuilder_ == null) { + orderBysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder>( + orderBys_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + orderBys_ = null; + } + return orderBysBuilder_; + } + + private boolean returnPropertyQuota_; + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 9; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 9; + * + * @param value The returnPropertyQuota to set. + * @return This builder for chaining. + */ + public Builder setReturnPropertyQuota(boolean value) { + + returnPropertyQuota_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 9; + * + * @return This builder for chaining. + */ + public Builder clearReturnPropertyQuota() { + + returnPropertyQuota_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunRealtimeReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunRealtimeReportRequest) + private static final com.google.analytics.data.v1beta.RunRealtimeReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunRealtimeReportRequest(); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunRealtimeReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunRealtimeReportRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequestOrBuilder.java new file mode 100644 index 00000000..7023d8fe --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequestOrBuilder.java @@ -0,0 +1,397 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunRealtimeReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunRealtimeReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List getDimensionsList(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.Dimension getDimensions(int index); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + int getDimensionsCount(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List + getDimensionsOrBuilderList(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index); + + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.Metric getMetrics(int index); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + int getMetricsCount(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index); + + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return Whether the dimensionFilter field is set. + */ + boolean hasDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + * + * @return The dimensionFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 4; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder(); + + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return Whether the metricFilter field is set. + */ + boolean hasMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + * + * @return The metricFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 5; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder(); + + /** + * + * + *
+   * Page size specifies maximum number of rows to return. If unspecified, up to
+   * 10,000 rows are returned. The API returns a maximum of 100,000 rows per
+   * request, no matter how many you ask for. Page size must be positive.
+   * The API can also return fewer rows than the requested `pageSize`, if there
+   * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination).
+   * 
+ * + * int32 page_size = 6; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return A list containing the metricAggregations. + */ + java.util.List getMetricAggregationsList(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return The count of metricAggregations. + */ + int getMetricAggregationsCount(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + java.util.List getMetricAggregationsValueList(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 7; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + int getMetricAggregationsValue(int index); + + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + java.util.List getOrderBysList(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + com.google.analytics.data.v1beta.OrderBy getOrderBys(int index); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + int getOrderBysCount(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + java.util.List + getOrderBysOrBuilderList(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 8; + */ + com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index); + + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 9; + * + * @return The returnPropertyQuota. + */ + boolean getReturnPropertyQuota(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponse.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponse.java new file mode 100644 index 00000000..1303ea90 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponse.java @@ -0,0 +1,3839 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The response realtime report table corresponding to a request.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunRealtimeReportResponse} + */ +public final class RunRealtimeReportResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunRealtimeReportResponse) + RunRealtimeReportResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunRealtimeReportResponse.newBuilder() to construct. + private RunRealtimeReportResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunRealtimeReportResponse() { + dimensionHeaders_ = java.util.Collections.emptyList(); + metricHeaders_ = java.util.Collections.emptyList(); + rows_ = java.util.Collections.emptyList(); + totals_ = java.util.Collections.emptyList(); + maximums_ = java.util.Collections.emptyList(); + minimums_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunRealtimeReportResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunRealtimeReportResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensionHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionHeader.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metricHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.MetricHeader.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + rows_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + totals_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + totals_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + maximums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + maximums_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + minimums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + minimums_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 56: + { + totalSize_ = input.readInt32(); + break; + } + case 66: + { + com.google.analytics.data.v1beta.PropertyQuota.Builder subBuilder = null; + if (propertyQuota_ != null) { + subBuilder = propertyQuota_.toBuilder(); + } + propertyQuota_ = + input.readMessage( + com.google.analytics.data.v1beta.PropertyQuota.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(propertyQuota_); + propertyQuota_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + totals_ = java.util.Collections.unmodifiableList(totals_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + maximums_ = java.util.Collections.unmodifiableList(maximums_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + minimums_ = java.util.Collections.unmodifiableList(minimums_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunRealtimeReportResponse.class, + com.google.analytics.data.v1beta.RunRealtimeReportResponse.Builder.class); + } + + public static final int DIMENSION_HEADERS_FIELD_NUMBER = 1; + private java.util.List dimensionHeaders_; + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersOrBuilderList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public int getDimensionHeadersCount() { + return dimensionHeaders_.size(); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + return dimensionHeaders_.get(index); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + return dimensionHeaders_.get(index); + } + + public static final int METRIC_HEADERS_FIELD_NUMBER = 2; + private java.util.List metricHeaders_; + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public java.util.List getMetricHeadersList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public java.util.List + getMetricHeadersOrBuilderList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public int getMetricHeadersCount() { + return metricHeaders_.size(); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + return metricHeaders_.get(index); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + return metricHeaders_.get(index); + } + + public static final int ROWS_FIELD_NUMBER = 3; + private java.util.List rows_; + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getRows(int index) { + return rows_.get(index); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + return rows_.get(index); + } + + public static final int TOTALS_FIELD_NUMBER = 4; + private java.util.List totals_; + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public java.util.List getTotalsList() { + return totals_; + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public java.util.List + getTotalsOrBuilderList() { + return totals_; + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public int getTotalsCount() { + return totals_.size(); + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getTotals(int index) { + return totals_.get(index); + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index) { + return totals_.get(index); + } + + public static final int MAXIMUMS_FIELD_NUMBER = 5; + private java.util.List maximums_; + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public java.util.List getMaximumsList() { + return maximums_; + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public java.util.List + getMaximumsOrBuilderList() { + return maximums_; + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public int getMaximumsCount() { + return maximums_.size(); + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getMaximums(int index) { + return maximums_.get(index); + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index) { + return maximums_.get(index); + } + + public static final int MINIMUMS_FIELD_NUMBER = 6; + private java.util.List minimums_; + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public java.util.List getMinimumsList() { + return minimums_; + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public java.util.List + getMinimumsOrBuilderList() { + return minimums_; + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public int getMinimumsCount() { + return minimums_.size(); + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getMinimums(int index) { + return minimums_.get(index); + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index) { + return minimums_.get(index); + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 7; + private int totalSize_; + /** + * + * + *
+   * The total number of rows in the query result. `totalSize` is independent of
+   * the number of rows returned in the response and the `pageSize` request
+   * parameter. For example if a query returns 175 rows and includes `pageSize`
+   * of 50 in the API request, the response will contain `totalSize` of 175 but
+   * only 50 rows.
+   * 
+ * + * int32 total_size = 7; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + + public static final int PROPERTY_QUOTA_FIELD_NUMBER = 8; + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return Whether the propertyQuota field is set. + */ + @java.lang.Override + public boolean hasPropertyQuota() { + return propertyQuota_ != null; + } + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return The propertyQuota. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + return getPropertyQuota(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensionHeaders_.size(); i++) { + output.writeMessage(1, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + output.writeMessage(2, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(3, rows_.get(i)); + } + for (int i = 0; i < totals_.size(); i++) { + output.writeMessage(4, totals_.get(i)); + } + for (int i = 0; i < maximums_.size(); i++) { + output.writeMessage(5, maximums_.get(i)); + } + for (int i = 0; i < minimums_.size(); i++) { + output.writeMessage(6, minimums_.get(i)); + } + if (totalSize_ != 0) { + output.writeInt32(7, totalSize_); + } + if (propertyQuota_ != null) { + output.writeMessage(8, getPropertyQuota()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dimensionHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rows_.get(i)); + } + for (int i = 0; i < totals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, totals_.get(i)); + } + for (int i = 0; i < maximums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, maximums_.get(i)); + } + for (int i = 0; i < minimums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, minimums_.get(i)); + } + if (totalSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, totalSize_); + } + if (propertyQuota_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPropertyQuota()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunRealtimeReportResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunRealtimeReportResponse other = + (com.google.analytics.data.v1beta.RunRealtimeReportResponse) obj; + + if (!getDimensionHeadersList().equals(other.getDimensionHeadersList())) return false; + if (!getMetricHeadersList().equals(other.getMetricHeadersList())) return false; + if (!getRowsList().equals(other.getRowsList())) return false; + if (!getTotalsList().equals(other.getTotalsList())) return false; + if (!getMaximumsList().equals(other.getMaximumsList())) return false; + if (!getMinimumsList().equals(other.getMinimumsList())) return false; + if (getTotalSize() != other.getTotalSize()) return false; + if (hasPropertyQuota() != other.hasPropertyQuota()) return false; + if (hasPropertyQuota()) { + if (!getPropertyQuota().equals(other.getPropertyQuota())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDimensionHeadersCount() > 0) { + hash = (37 * hash) + DIMENSION_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionHeadersList().hashCode(); + } + if (getMetricHeadersCount() > 0) { + hash = (37 * hash) + METRIC_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getMetricHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + if (getTotalsCount() > 0) { + hash = (37 * hash) + TOTALS_FIELD_NUMBER; + hash = (53 * hash) + getTotalsList().hashCode(); + } + if (getMaximumsCount() > 0) { + hash = (37 * hash) + MAXIMUMS_FIELD_NUMBER; + hash = (53 * hash) + getMaximumsList().hashCode(); + } + if (getMinimumsCount() > 0) { + hash = (37 * hash) + MINIMUMS_FIELD_NUMBER; + hash = (53 * hash) + getMinimumsList().hashCode(); + } + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTotalSize(); + if (hasPropertyQuota()) { + hash = (37 * hash) + PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + getPropertyQuota().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.data.v1beta.RunRealtimeReportResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response realtime report table corresponding to a request.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunRealtimeReportResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunRealtimeReportResponse) + com.google.analytics.data.v1beta.RunRealtimeReportResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunRealtimeReportResponse.class, + com.google.analytics.data.v1beta.RunRealtimeReportResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunRealtimeReportResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionHeadersFieldBuilder(); + getMetricHeadersFieldBuilder(); + getRowsFieldBuilder(); + getTotalsFieldBuilder(); + getMaximumsFieldBuilder(); + getMinimumsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionHeadersBuilder_.clear(); + } + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricHeadersBuilder_.clear(); + } + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rowsBuilder_.clear(); + } + if (totalsBuilder_ == null) { + totals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + totalsBuilder_.clear(); + } + if (maximumsBuilder_ == null) { + maximums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + maximumsBuilder_.clear(); + } + if (minimumsBuilder_ == null) { + minimums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + minimumsBuilder_.clear(); + } + totalSize_ = 0; + + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunRealtimeReportResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportResponse getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunRealtimeReportResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportResponse build() { + com.google.analytics.data.v1beta.RunRealtimeReportResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportResponse buildPartial() { + com.google.analytics.data.v1beta.RunRealtimeReportResponse result = + new com.google.analytics.data.v1beta.RunRealtimeReportResponse(this); + int from_bitField0_ = bitField0_; + if (dimensionHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensionHeaders_ = dimensionHeaders_; + } else { + result.dimensionHeaders_ = dimensionHeadersBuilder_.build(); + } + if (metricHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metricHeaders_ = metricHeaders_; + } else { + result.metricHeaders_ = metricHeadersBuilder_.build(); + } + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + if (totalsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + totals_ = java.util.Collections.unmodifiableList(totals_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.totals_ = totals_; + } else { + result.totals_ = totalsBuilder_.build(); + } + if (maximumsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + maximums_ = java.util.Collections.unmodifiableList(maximums_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.maximums_ = maximums_; + } else { + result.maximums_ = maximumsBuilder_.build(); + } + if (minimumsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + minimums_ = java.util.Collections.unmodifiableList(minimums_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.minimums_ = minimums_; + } else { + result.minimums_ = minimumsBuilder_.build(); + } + result.totalSize_ = totalSize_; + if (propertyQuotaBuilder_ == null) { + result.propertyQuota_ = propertyQuota_; + } else { + result.propertyQuota_ = propertyQuotaBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunRealtimeReportResponse) { + return mergeFrom((com.google.analytics.data.v1beta.RunRealtimeReportResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunRealtimeReportResponse other) { + if (other == com.google.analytics.data.v1beta.RunRealtimeReportResponse.getDefaultInstance()) + return this; + if (dimensionHeadersBuilder_ == null) { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeaders_.isEmpty()) { + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.addAll(other.dimensionHeaders_); + } + onChanged(); + } + } else { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeadersBuilder_.isEmpty()) { + dimensionHeadersBuilder_.dispose(); + dimensionHeadersBuilder_ = null; + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionHeadersFieldBuilder() + : null; + } else { + dimensionHeadersBuilder_.addAllMessages(other.dimensionHeaders_); + } + } + } + if (metricHeadersBuilder_ == null) { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeaders_.isEmpty()) { + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricHeadersIsMutable(); + metricHeaders_.addAll(other.metricHeaders_); + } + onChanged(); + } + } else { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeadersBuilder_.isEmpty()) { + metricHeadersBuilder_.dispose(); + metricHeadersBuilder_ = null; + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + metricHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricHeadersFieldBuilder() + : null; + } else { + metricHeadersBuilder_.addAllMessages(other.metricHeaders_); + } + } + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + rowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowsFieldBuilder() + : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + if (totalsBuilder_ == null) { + if (!other.totals_.isEmpty()) { + if (totals_.isEmpty()) { + totals_ = other.totals_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTotalsIsMutable(); + totals_.addAll(other.totals_); + } + onChanged(); + } + } else { + if (!other.totals_.isEmpty()) { + if (totalsBuilder_.isEmpty()) { + totalsBuilder_.dispose(); + totalsBuilder_ = null; + totals_ = other.totals_; + bitField0_ = (bitField0_ & ~0x00000008); + totalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTotalsFieldBuilder() + : null; + } else { + totalsBuilder_.addAllMessages(other.totals_); + } + } + } + if (maximumsBuilder_ == null) { + if (!other.maximums_.isEmpty()) { + if (maximums_.isEmpty()) { + maximums_ = other.maximums_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureMaximumsIsMutable(); + maximums_.addAll(other.maximums_); + } + onChanged(); + } + } else { + if (!other.maximums_.isEmpty()) { + if (maximumsBuilder_.isEmpty()) { + maximumsBuilder_.dispose(); + maximumsBuilder_ = null; + maximums_ = other.maximums_; + bitField0_ = (bitField0_ & ~0x00000010); + maximumsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMaximumsFieldBuilder() + : null; + } else { + maximumsBuilder_.addAllMessages(other.maximums_); + } + } + } + if (minimumsBuilder_ == null) { + if (!other.minimums_.isEmpty()) { + if (minimums_.isEmpty()) { + minimums_ = other.minimums_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMinimumsIsMutable(); + minimums_.addAll(other.minimums_); + } + onChanged(); + } + } else { + if (!other.minimums_.isEmpty()) { + if (minimumsBuilder_.isEmpty()) { + minimumsBuilder_.dispose(); + minimumsBuilder_ = null; + minimums_ = other.minimums_; + bitField0_ = (bitField0_ & ~0x00000020); + minimumsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMinimumsFieldBuilder() + : null; + } else { + minimumsBuilder_.addAllMessages(other.minimums_); + } + } + } + if (other.getTotalSize() != 0) { + setTotalSize(other.getTotalSize()); + } + if (other.hasPropertyQuota()) { + mergePropertyQuota(other.getPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunRealtimeReportResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunRealtimeReportResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dimensionHeaders_ = + java.util.Collections.emptyList(); + + private void ensureDimensionHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList( + dimensionHeaders_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + dimensionHeadersBuilder_; + + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersList() { + if (dimensionHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } else { + return dimensionHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public int getDimensionHeadersCount() { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.size(); + } else { + return dimensionHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders(com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addAllDimensionHeaders( + java.lang.Iterable values) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionHeaders_); + onChanged(); + } else { + dimensionHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder clearDimensionHeaders() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder removeDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.remove(index); + onChanged(); + } else { + dimensionHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder getDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersOrBuilderList() { + if (dimensionHeadersBuilder_ != null) { + return dimensionHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder() { + return getDimensionHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersBuilderList() { + return getDimensionHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + getDimensionHeadersFieldBuilder() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder>( + dimensionHeaders_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dimensionHeaders_ = null; + } + return dimensionHeadersBuilder_; + } + + private java.util.List metricHeaders_ = + java.util.Collections.emptyList(); + + private void ensureMetricHeadersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = + new java.util.ArrayList(metricHeaders_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + metricHeadersBuilder_; + + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List getMetricHeadersList() { + if (metricHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricHeaders_); + } else { + return metricHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public int getMetricHeadersCount() { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.size(); + } else { + return metricHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, value); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders(com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addAllMetricHeaders( + java.lang.Iterable values) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricHeaders_); + onChanged(); + } else { + metricHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder clearMetricHeaders() { + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder removeMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.remove(index); + onChanged(); + } else { + metricHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder getMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List + getMetricHeadersOrBuilderList() { + if (metricHeadersBuilder_ != null) { + return metricHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricHeaders_); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder() { + return getMetricHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List + getMetricHeadersBuilderList() { + return getMetricHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + getMetricHeadersFieldBuilder() { + if (metricHeadersBuilder_ == null) { + metricHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder>( + metricHeaders_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + metricHeaders_ = null; + } + return metricHeadersBuilder_; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + rowsBuilder_; + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder setRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder setRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder getRowsBuilder(int index) { + return getRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder() { + return getRowsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder(int index) { + return getRowsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + rows_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + private java.util.List totals_ = + java.util.Collections.emptyList(); + + private void ensureTotalsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + totals_ = new java.util.ArrayList(totals_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + totalsBuilder_; + + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List getTotalsList() { + if (totalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(totals_); + } else { + return totalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public int getTotalsCount() { + if (totalsBuilder_ == null) { + return totals_.size(); + } else { + return totalsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row getTotals(int index) { + if (totalsBuilder_ == null) { + return totals_.get(index); + } else { + return totalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder setTotals(int index, com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.set(index, value); + onChanged(); + } else { + totalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder setTotals( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.set(index, builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.add(value); + onChanged(); + } else { + totalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(int index, com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.add(index, value); + onChanged(); + } else { + totalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.add(builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.add(index, builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addAllTotals( + java.lang.Iterable values) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, totals_); + onChanged(); + } else { + totalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder clearTotals() { + if (totalsBuilder_ == null) { + totals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + totalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder removeTotals(int index) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.remove(index); + onChanged(); + } else { + totalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder getTotalsBuilder(int index) { + return getTotalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index) { + if (totalsBuilder_ == null) { + return totals_.get(index); + } else { + return totalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List + getTotalsOrBuilderList() { + if (totalsBuilder_ != null) { + return totalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(totals_); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addTotalsBuilder() { + return getTotalsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addTotalsBuilder(int index) { + return getTotalsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List getTotalsBuilderList() { + return getTotalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getTotalsFieldBuilder() { + if (totalsBuilder_ == null) { + totalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + totals_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + totals_ = null; + } + return totalsBuilder_; + } + + private java.util.List maximums_ = + java.util.Collections.emptyList(); + + private void ensureMaximumsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + maximums_ = new java.util.ArrayList(maximums_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + maximumsBuilder_; + + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List getMaximumsList() { + if (maximumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(maximums_); + } else { + return maximumsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public int getMaximumsCount() { + if (maximumsBuilder_ == null) { + return maximums_.size(); + } else { + return maximumsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row getMaximums(int index) { + if (maximumsBuilder_ == null) { + return maximums_.get(index); + } else { + return maximumsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder setMaximums(int index, com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.set(index, value); + onChanged(); + } else { + maximumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder setMaximums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.set(index, builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.add(value); + onChanged(); + } else { + maximumsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(int index, com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.add(index, value); + onChanged(); + } else { + maximumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.add(builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.add(index, builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addAllMaximums( + java.lang.Iterable values) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, maximums_); + onChanged(); + } else { + maximumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder clearMaximums() { + if (maximumsBuilder_ == null) { + maximums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + maximumsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder removeMaximums(int index) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.remove(index); + onChanged(); + } else { + maximumsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder getMaximumsBuilder(int index) { + return getMaximumsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index) { + if (maximumsBuilder_ == null) { + return maximums_.get(index); + } else { + return maximumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List + getMaximumsOrBuilderList() { + if (maximumsBuilder_ != null) { + return maximumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(maximums_); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addMaximumsBuilder() { + return getMaximumsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addMaximumsBuilder(int index) { + return getMaximumsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List getMaximumsBuilderList() { + return getMaximumsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getMaximumsFieldBuilder() { + if (maximumsBuilder_ == null) { + maximumsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + maximums_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + maximums_ = null; + } + return maximumsBuilder_; + } + + private java.util.List minimums_ = + java.util.Collections.emptyList(); + + private void ensureMinimumsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + minimums_ = new java.util.ArrayList(minimums_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + minimumsBuilder_; + + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List getMinimumsList() { + if (minimumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(minimums_); + } else { + return minimumsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public int getMinimumsCount() { + if (minimumsBuilder_ == null) { + return minimums_.size(); + } else { + return minimumsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row getMinimums(int index) { + if (minimumsBuilder_ == null) { + return minimums_.get(index); + } else { + return minimumsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder setMinimums(int index, com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.set(index, value); + onChanged(); + } else { + minimumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder setMinimums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.set(index, builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.add(value); + onChanged(); + } else { + minimumsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(int index, com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.add(index, value); + onChanged(); + } else { + minimumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.add(builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.add(index, builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addAllMinimums( + java.lang.Iterable values) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, minimums_); + onChanged(); + } else { + minimumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder clearMinimums() { + if (minimumsBuilder_ == null) { + minimums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + minimumsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder removeMinimums(int index) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.remove(index); + onChanged(); + } else { + minimumsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder getMinimumsBuilder(int index) { + return getMinimumsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index) { + if (minimumsBuilder_ == null) { + return minimums_.get(index); + } else { + return minimumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List + getMinimumsOrBuilderList() { + if (minimumsBuilder_ != null) { + return minimumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(minimums_); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder addMinimumsBuilder() { + return getMinimumsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder addMinimumsBuilder(int index) { + return getMinimumsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List getMinimumsBuilderList() { + return getMinimumsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getMinimumsFieldBuilder() { + if (minimumsBuilder_ == null) { + minimumsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + minimums_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + minimums_ = null; + } + return minimumsBuilder_; + } + + private int totalSize_; + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response and the `pageSize` request
+     * parameter. For example if a query returns 175 rows and includes `pageSize`
+     * of 50 in the API request, the response will contain `totalSize` of 175 but
+     * only 50 rows.
+     * 
+ * + * int32 total_size = 7; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response and the `pageSize` request
+     * parameter. For example if a query returns 175 rows and includes `pageSize`
+     * of 50 in the API request, the response will contain `totalSize` of 175 but
+     * only 50 rows.
+     * 
+ * + * int32 total_size = 7; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(int value) { + + totalSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response and the `pageSize` request
+     * parameter. For example if a query returns 175 rows and includes `pageSize`
+     * of 50 in the API request, the response will contain `totalSize` of 175 but
+     * only 50 rows.
+     * 
+ * + * int32 total_size = 7; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + + totalSize_ = 0; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + propertyQuotaBuilder_; + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return Whether the propertyQuota field is set. + */ + public boolean hasPropertyQuota() { + return propertyQuotaBuilder_ != null || propertyQuota_ != null; + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return The propertyQuota. + */ + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } else { + return propertyQuotaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public Builder setPropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + propertyQuota_ = value; + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public Builder setPropertyQuota( + com.google.analytics.data.v1beta.PropertyQuota.Builder builderForValue) { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = builderForValue.build(); + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public Builder mergePropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (propertyQuota_ != null) { + propertyQuota_ = + com.google.analytics.data.v1beta.PropertyQuota.newBuilder(propertyQuota_) + .mergeFrom(value) + .buildPartial(); + } else { + propertyQuota_ = value; + } + onChanged(); + } else { + propertyQuotaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public Builder clearPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + onChanged(); + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public com.google.analytics.data.v1beta.PropertyQuota.Builder getPropertyQuotaBuilder() { + + onChanged(); + return getPropertyQuotaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + if (propertyQuotaBuilder_ != null) { + return propertyQuotaBuilder_.getMessageOrBuilder(); + } else { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + } + /** + * + * + *
+     * This Analytics Property's Realtime quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + getPropertyQuotaFieldBuilder() { + if (propertyQuotaBuilder_ == null) { + propertyQuotaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder>( + getPropertyQuota(), getParentForChildren(), isClean()); + propertyQuota_ = null; + } + return propertyQuotaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunRealtimeReportResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunRealtimeReportResponse) + private static final com.google.analytics.data.v1beta.RunRealtimeReportResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunRealtimeReportResponse(); + } + + public static com.google.analytics.data.v1beta.RunRealtimeReportResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunRealtimeReportResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunRealtimeReportResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunRealtimeReportResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponseOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponseOrBuilder.java new file mode 100644 index 00000000..d7b1bf8d --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponseOrBuilder.java @@ -0,0 +1,397 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunRealtimeReportResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunRealtimeReportResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + java.util.List getDimensionHeadersList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + int getDimensionHeadersCount(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + java.util.List + getDimensionHeadersOrBuilderList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder(int index); + + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + java.util.List getMetricHeadersList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + int getMetricHeadersCount(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + java.util.List + getMetricHeadersOrBuilderList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder(int index); + + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + java.util.List getRowsList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + com.google.analytics.data.v1beta.Row getRows(int index); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + int getRowsCount(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + java.util.List getRowsOrBuilderList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + java.util.List getTotalsList(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + com.google.analytics.data.v1beta.Row getTotals(int index); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + int getTotalsCount(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + java.util.List getTotalsOrBuilderList(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + java.util.List getMaximumsList(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + com.google.analytics.data.v1beta.Row getMaximums(int index); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + int getMaximumsCount(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + java.util.List + getMaximumsOrBuilderList(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + java.util.List getMinimumsList(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + com.google.analytics.data.v1beta.Row getMinimums(int index); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + int getMinimumsCount(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + java.util.List + getMinimumsOrBuilderList(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index); + + /** + * + * + *
+   * The total number of rows in the query result. `totalSize` is independent of
+   * the number of rows returned in the response and the `pageSize` request
+   * parameter. For example if a query returns 175 rows and includes `pageSize`
+   * of 50 in the API request, the response will contain `totalSize` of 175 but
+   * only 50 rows.
+   * 
+ * + * int32 total_size = 7; + * + * @return The totalSize. + */ + int getTotalSize(); + + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return Whether the propertyQuota field is set. + */ + boolean hasPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + * + * @return The propertyQuota. + */ + com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's Realtime quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 8; + */ + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequest.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequest.java new file mode 100644 index 00000000..6219d735 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequest.java @@ -0,0 +1,4768 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The request to generate a report.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunReportRequest} + */ +public final class RunReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunReportRequest) + RunReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunReportRequest.newBuilder() to construct. + private RunReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunReportRequest() { + property_ = ""; + dimensions_ = java.util.Collections.emptyList(); + metrics_ = java.util.Collections.emptyList(); + dateRanges_ = java.util.Collections.emptyList(); + pageToken_ = ""; + metricAggregations_ = java.util.Collections.emptyList(); + orderBys_ = java.util.Collections.emptyList(); + currencyCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensions_.add( + input.readMessage( + com.google.analytics.data.v1beta.Dimension.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metrics_.add( + input.readMessage( + com.google.analytics.data.v1beta.Metric.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + dateRanges_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + dateRanges_.add( + input.readMessage( + com.google.analytics.data.v1beta.DateRange.parser(), extensionRegistry)); + break; + } + case 42: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (dimensionFilter_ != null) { + subBuilder = dimensionFilter_.toBuilder(); + } + dimensionFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dimensionFilter_); + dimensionFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.analytics.data.v1beta.FilterExpression.Builder subBuilder = null; + if (metricFilter_ != null) { + subBuilder = metricFilter_.toBuilder(); + } + metricFilter_ = + input.readMessage( + com.google.analytics.data.v1beta.FilterExpression.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metricFilter_); + metricFilter_ = subBuilder.buildPartial(); + } + + break; + } + case 56: + { + pageSize_ = input.readInt32(); + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 72: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + metricAggregations_.add(rawValue); + break; + } + case 74: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + metricAggregations_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + metricAggregations_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + orderBys_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + orderBys_.add( + input.readMessage( + com.google.analytics.data.v1beta.OrderBy.parser(), extensionRegistry)); + break; + } + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + + currencyCode_ = s; + break; + } + case 98: + { + com.google.analytics.data.v1beta.CohortSpec.Builder subBuilder = null; + if (cohortSpec_ != null) { + subBuilder = cohortSpec_.toBuilder(); + } + cohortSpec_ = + input.readMessage( + com.google.analytics.data.v1beta.CohortSpec.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cohortSpec_); + cohortSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 104: + { + keepEmptyRows_ = input.readBool(); + break; + } + case 112: + { + returnPropertyQuota_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + dateRanges_ = java.util.Collections.unmodifiableList(dateRanges_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunReportRequest.class, + com.google.analytics.data.v1beta.RunReportRequest.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIMENSIONS_FIELD_NUMBER = 2; + private java.util.List dimensions_; + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List getDimensionsList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public java.util.List + getDimensionsOrBuilderList() { + return dimensions_; + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public int getDimensionsCount() { + return dimensions_.size(); + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + return dimensions_.get(index); + } + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + return dimensions_.get(index); + } + + public static final int METRICS_FIELD_NUMBER = 3; + private java.util.List metrics_; + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List getMetricsList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public java.util.List + getMetricsOrBuilderList() { + return metrics_; + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public int getMetricsCount() { + return metrics_.size(); + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + return metrics_.get(index); + } + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + return metrics_.get(index); + } + + public static final int DATE_RANGES_FIELD_NUMBER = 4; + private java.util.List dateRanges_; + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public java.util.List getDateRangesList() { + return dateRanges_; + } + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public java.util.List + getDateRangesOrBuilderList() { + return dateRanges_; + } + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public int getDateRangesCount() { + return dateRanges_.size(); + } + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRange getDateRanges(int index) { + return dateRanges_.get(index); + } + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index) { + return dateRanges_.get(index); + } + + public static final int DIMENSION_FILTER_FIELD_NUMBER = 5; + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return Whether the dimensionFilter field is set. + */ + @java.lang.Override + public boolean hasDimensionFilter() { + return dimensionFilter_ != null; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return The dimensionFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder() { + return getDimensionFilter(); + } + + public static final int METRIC_FILTER_FIELD_NUMBER = 6; + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return Whether the metricFilter field is set. + */ + @java.lang.Override + public boolean hasMetricFilter() { + return metricFilter_ != null; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return The metricFilter. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + return getMetricFilter(); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 7; + private int pageSize_; + /** + * + * + *
+   * Page size is for paging and specifies maximum number of rows to return. The
+   * API returns a maximum of 200,000 rows per request, no matter how many you
+   * ask for. Page size must be positive.
+   * The API can also return fewer rows than the requested `pageSize`, if there
+   * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * int32 page_size = 7; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 8; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A continuation token to get the next page of the results. Adding this to
+   * the request will return the next page of rows after the `pageToken`. The
+   * `pageToken` should be the value returned in the `nextPageToken` parameter
+   * in the response.
+   * When paginating, all other parameters specified in `RunReportRequest` must
+   * match the call that provided the page token.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string page_token = 8; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A continuation token to get the next page of the results. Adding this to
+   * the request will return the next page of rows after the `pageToken`. The
+   * `pageToken` should be the value returned in the `nextPageToken` parameter
+   * in the response.
+   * When paginating, all other parameters specified in `RunReportRequest` must
+   * match the call that provided the page token.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string page_token = 8; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METRIC_AGGREGATIONS_FIELD_NUMBER = 9; + private java.util.List metricAggregations_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation> + metricAggregations_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>() { + public com.google.analytics.data.v1beta.MetricAggregation convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.analytics.data.v1beta.MetricAggregation result = + com.google.analytics.data.v1beta.MetricAggregation.valueOf(from); + return result == null + ? com.google.analytics.data.v1beta.MetricAggregation.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return A list containing the metricAggregations. + */ + @java.lang.Override + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return The count of metricAggregations. + */ + @java.lang.Override + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + @java.lang.Override + public java.util.List getMetricAggregationsValueList() { + return metricAggregations_; + } + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + @java.lang.Override + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + + private int metricAggregationsMemoizedSerializedSize; + + public static final int ORDER_BYS_FIELD_NUMBER = 10; + private java.util.List orderBys_; + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + @java.lang.Override + public java.util.List getOrderBysList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + @java.lang.Override + public java.util.List + getOrderBysOrBuilderList() { + return orderBys_; + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + @java.lang.Override + public int getOrderBysCount() { + return orderBys_.size(); + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + return orderBys_.get(index); + } + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + return orderBys_.get(index); + } + + public static final int CURRENCY_CODE_FIELD_NUMBER = 11; + private volatile java.lang.Object currencyCode_; + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 11; + * + * @return The currencyCode. + */ + @java.lang.Override + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } + } + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 11; + * + * @return The bytes for currencyCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COHORT_SPEC_FIELD_NUMBER = 12; + private com.google.analytics.data.v1beta.CohortSpec cohortSpec_; + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return Whether the cohortSpec field is set. + */ + @java.lang.Override + public boolean hasCohortSpec() { + return cohortSpec_ != null; + } + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return The cohortSpec. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpec getCohortSpec() { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder() { + return getCohortSpec(); + } + + public static final int KEEP_EMPTY_ROWS_FIELD_NUMBER = 13; + private boolean keepEmptyRows_; + /** + * + * + *
+   * If false or unspecified, each row with all metrics equal to 0 will not be
+   * returned. If true, these rows will be returned if they are not separately
+   * removed by a filter.
+   * 
+ * + * bool keep_empty_rows = 13; + * + * @return The keepEmptyRows. + */ + @java.lang.Override + public boolean getKeepEmptyRows() { + return keepEmptyRows_; + } + + public static final int RETURN_PROPERTY_QUOTA_FIELD_NUMBER = 14; + private boolean returnPropertyQuota_; + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 14; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + output.writeMessage(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + output.writeMessage(3, metrics_.get(i)); + } + for (int i = 0; i < dateRanges_.size(); i++) { + output.writeMessage(4, dateRanges_.get(i)); + } + if (dimensionFilter_ != null) { + output.writeMessage(5, getDimensionFilter()); + } + if (metricFilter_ != null) { + output.writeMessage(6, getMetricFilter()); + } + if (pageSize_ != 0) { + output.writeInt32(7, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, pageToken_); + } + if (getMetricAggregationsList().size() > 0) { + output.writeUInt32NoTag(74); + output.writeUInt32NoTag(metricAggregationsMemoizedSerializedSize); + } + for (int i = 0; i < metricAggregations_.size(); i++) { + output.writeEnumNoTag(metricAggregations_.get(i)); + } + for (int i = 0; i < orderBys_.size(); i++) { + output.writeMessage(10, orderBys_.get(i)); + } + if (!getCurrencyCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, currencyCode_); + } + if (cohortSpec_ != null) { + output.writeMessage(12, getCohortSpec()); + } + if (keepEmptyRows_ != false) { + output.writeBool(13, keepEmptyRows_); + } + if (returnPropertyQuota_ != false) { + output.writeBool(14, returnPropertyQuota_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + for (int i = 0; i < dimensions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, dimensions_.get(i)); + } + for (int i = 0; i < metrics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, metrics_.get(i)); + } + for (int i = 0; i < dateRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, dateRanges_.get(i)); + } + if (dimensionFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDimensionFilter()); + } + if (metricFilter_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetricFilter()); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, pageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < metricAggregations_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(metricAggregations_.get(i)); + } + size += dataSize; + if (!getMetricAggregationsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + metricAggregationsMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < orderBys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, orderBys_.get(i)); + } + if (!getCurrencyCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, currencyCode_); + } + if (cohortSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCohortSpec()); + } + if (keepEmptyRows_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, keepEmptyRows_); + } + if (returnPropertyQuota_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, returnPropertyQuota_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunReportRequest)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunReportRequest other = + (com.google.analytics.data.v1beta.RunReportRequest) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getDimensionsList().equals(other.getDimensionsList())) return false; + if (!getMetricsList().equals(other.getMetricsList())) return false; + if (!getDateRangesList().equals(other.getDateRangesList())) return false; + if (hasDimensionFilter() != other.hasDimensionFilter()) return false; + if (hasDimensionFilter()) { + if (!getDimensionFilter().equals(other.getDimensionFilter())) return false; + } + if (hasMetricFilter() != other.hasMetricFilter()) return false; + if (hasMetricFilter()) { + if (!getMetricFilter().equals(other.getMetricFilter())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!metricAggregations_.equals(other.metricAggregations_)) return false; + if (!getOrderBysList().equals(other.getOrderBysList())) return false; + if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; + if (hasCohortSpec() != other.hasCohortSpec()) return false; + if (hasCohortSpec()) { + if (!getCohortSpec().equals(other.getCohortSpec())) return false; + } + if (getKeepEmptyRows() != other.getKeepEmptyRows()) return false; + if (getReturnPropertyQuota() != other.getReturnPropertyQuota()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + if (getDimensionsCount() > 0) { + hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionsList().hashCode(); + } + if (getMetricsCount() > 0) { + hash = (37 * hash) + METRICS_FIELD_NUMBER; + hash = (53 * hash) + getMetricsList().hashCode(); + } + if (getDateRangesCount() > 0) { + hash = (37 * hash) + DATE_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getDateRangesList().hashCode(); + } + if (hasDimensionFilter()) { + hash = (37 * hash) + DIMENSION_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getDimensionFilter().hashCode(); + } + if (hasMetricFilter()) { + hash = (37 * hash) + METRIC_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getMetricFilter().hashCode(); + } + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + if (getMetricAggregationsCount() > 0) { + hash = (37 * hash) + METRIC_AGGREGATIONS_FIELD_NUMBER; + hash = (53 * hash) + metricAggregations_.hashCode(); + } + if (getOrderBysCount() > 0) { + hash = (37 * hash) + ORDER_BYS_FIELD_NUMBER; + hash = (53 * hash) + getOrderBysList().hashCode(); + } + hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; + hash = (53 * hash) + getCurrencyCode().hashCode(); + if (hasCohortSpec()) { + hash = (37 * hash) + COHORT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getCohortSpec().hashCode(); + } + hash = (37 * hash) + KEEP_EMPTY_ROWS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getKeepEmptyRows()); + hash = (37 * hash) + RETURN_PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPropertyQuota()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.RunReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request to generate a report.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunReportRequest) + com.google.analytics.data.v1beta.RunReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunReportRequest.class, + com.google.analytics.data.v1beta.RunReportRequest.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunReportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionsFieldBuilder(); + getMetricsFieldBuilder(); + getDateRangesFieldBuilder(); + getOrderBysFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionsBuilder_.clear(); + } + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricsBuilder_.clear(); + } + if (dateRangesBuilder_ == null) { + dateRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + dateRangesBuilder_.clear(); + } + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + pageSize_ = 0; + + pageToken_ = ""; + + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + orderBysBuilder_.clear(); + } + currencyCode_ = ""; + + if (cohortSpecBuilder_ == null) { + cohortSpec_ = null; + } else { + cohortSpec_ = null; + cohortSpecBuilder_ = null; + } + keepEmptyRows_ = false; + + returnPropertyQuota_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequest getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequest build() { + com.google.analytics.data.v1beta.RunReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequest buildPartial() { + com.google.analytics.data.v1beta.RunReportRequest result = + new com.google.analytics.data.v1beta.RunReportRequest(this); + int from_bitField0_ = bitField0_; + result.property_ = property_; + if (dimensionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensions_ = java.util.Collections.unmodifiableList(dimensions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensions_ = dimensions_; + } else { + result.dimensions_ = dimensionsBuilder_.build(); + } + if (metricsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metrics_ = java.util.Collections.unmodifiableList(metrics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metrics_ = metrics_; + } else { + result.metrics_ = metricsBuilder_.build(); + } + if (dateRangesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + dateRanges_ = java.util.Collections.unmodifiableList(dateRanges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.dateRanges_ = dateRanges_; + } else { + result.dateRanges_ = dateRangesBuilder_.build(); + } + if (dimensionFilterBuilder_ == null) { + result.dimensionFilter_ = dimensionFilter_; + } else { + result.dimensionFilter_ = dimensionFilterBuilder_.build(); + } + if (metricFilterBuilder_ == null) { + result.metricFilter_ = metricFilter_; + } else { + result.metricFilter_ = metricFilterBuilder_.build(); + } + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + if (((bitField0_ & 0x00000008) != 0)) { + metricAggregations_ = java.util.Collections.unmodifiableList(metricAggregations_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.metricAggregations_ = metricAggregations_; + if (orderBysBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + orderBys_ = java.util.Collections.unmodifiableList(orderBys_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.orderBys_ = orderBys_; + } else { + result.orderBys_ = orderBysBuilder_.build(); + } + result.currencyCode_ = currencyCode_; + if (cohortSpecBuilder_ == null) { + result.cohortSpec_ = cohortSpec_; + } else { + result.cohortSpec_ = cohortSpecBuilder_.build(); + } + result.keepEmptyRows_ = keepEmptyRows_; + result.returnPropertyQuota_ = returnPropertyQuota_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunReportRequest) { + return mergeFrom((com.google.analytics.data.v1beta.RunReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunReportRequest other) { + if (other == com.google.analytics.data.v1beta.RunReportRequest.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (dimensionsBuilder_ == null) { + if (!other.dimensions_.isEmpty()) { + if (dimensions_.isEmpty()) { + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionsIsMutable(); + dimensions_.addAll(other.dimensions_); + } + onChanged(); + } + } else { + if (!other.dimensions_.isEmpty()) { + if (dimensionsBuilder_.isEmpty()) { + dimensionsBuilder_.dispose(); + dimensionsBuilder_ = null; + dimensions_ = other.dimensions_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionsFieldBuilder() + : null; + } else { + dimensionsBuilder_.addAllMessages(other.dimensions_); + } + } + } + if (metricsBuilder_ == null) { + if (!other.metrics_.isEmpty()) { + if (metrics_.isEmpty()) { + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricsIsMutable(); + metrics_.addAll(other.metrics_); + } + onChanged(); + } + } else { + if (!other.metrics_.isEmpty()) { + if (metricsBuilder_.isEmpty()) { + metricsBuilder_.dispose(); + metricsBuilder_ = null; + metrics_ = other.metrics_; + bitField0_ = (bitField0_ & ~0x00000002); + metricsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricsFieldBuilder() + : null; + } else { + metricsBuilder_.addAllMessages(other.metrics_); + } + } + } + if (dateRangesBuilder_ == null) { + if (!other.dateRanges_.isEmpty()) { + if (dateRanges_.isEmpty()) { + dateRanges_ = other.dateRanges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureDateRangesIsMutable(); + dateRanges_.addAll(other.dateRanges_); + } + onChanged(); + } + } else { + if (!other.dateRanges_.isEmpty()) { + if (dateRangesBuilder_.isEmpty()) { + dateRangesBuilder_.dispose(); + dateRangesBuilder_ = null; + dateRanges_ = other.dateRanges_; + bitField0_ = (bitField0_ & ~0x00000004); + dateRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDateRangesFieldBuilder() + : null; + } else { + dateRangesBuilder_.addAllMessages(other.dateRanges_); + } + } + } + if (other.hasDimensionFilter()) { + mergeDimensionFilter(other.getDimensionFilter()); + } + if (other.hasMetricFilter()) { + mergeMetricFilter(other.getMetricFilter()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.metricAggregations_.isEmpty()) { + if (metricAggregations_.isEmpty()) { + metricAggregations_ = other.metricAggregations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMetricAggregationsIsMutable(); + metricAggregations_.addAll(other.metricAggregations_); + } + onChanged(); + } + if (orderBysBuilder_ == null) { + if (!other.orderBys_.isEmpty()) { + if (orderBys_.isEmpty()) { + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOrderBysIsMutable(); + orderBys_.addAll(other.orderBys_); + } + onChanged(); + } + } else { + if (!other.orderBys_.isEmpty()) { + if (orderBysBuilder_.isEmpty()) { + orderBysBuilder_.dispose(); + orderBysBuilder_ = null; + orderBys_ = other.orderBys_; + bitField0_ = (bitField0_ & ~0x00000010); + orderBysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOrderBysFieldBuilder() + : null; + } else { + orderBysBuilder_.addAllMessages(other.orderBys_); + } + } + } + if (!other.getCurrencyCode().isEmpty()) { + currencyCode_ = other.currencyCode_; + onChanged(); + } + if (other.hasCohortSpec()) { + mergeCohortSpec(other.getCohortSpec()); + } + if (other.getKeepEmptyRows() != false) { + setKeepEmptyRows(other.getKeepEmptyRows()); + } + if (other.getReturnPropertyQuota() != false) { + setReturnPropertyQuota(other.getReturnPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunReportRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * A Google Analytics GA4 property identifier whose events are tracked.
+     * Specified in the URL path and not the body. To learn more, see [where to
+     * find your Property
+     * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+     * Within a batch request, this property should either be unspecified or
+     * consistent with the batch-level property.
+     * Example: properties/1234
+     * 
+ * + * string property = 1; + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.util.List dimensions_ = + java.util.Collections.emptyList(); + + private void ensureDimensionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensions_ = + new java.util.ArrayList(dimensions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + dimensionsBuilder_; + + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List getDimensionsList() { + if (dimensionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensions_); + } else { + return dimensionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public int getDimensionsCount() { + if (dimensionsBuilder_ == null) { + return dimensions_.size(); + } else { + return dimensionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension getDimensions(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.set(index, value); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder setDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions(int index, com.google.analytics.data.v1beta.Dimension value) { + if (dimensionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionsIsMutable(); + dimensions_.add(index, value); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addDimensions( + int index, com.google.analytics.data.v1beta.Dimension.Builder builderForValue) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder addAllDimensions( + java.lang.Iterable values) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensions_); + onChanged(); + } else { + dimensionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder clearDimensions() { + if (dimensionsBuilder_ == null) { + dimensions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public Builder removeDimensions(int index) { + if (dimensionsBuilder_ == null) { + ensureDimensionsIsMutable(); + dimensions_.remove(index); + onChanged(); + } else { + dimensionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder getDimensionsBuilder(int index) { + return getDimensionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index) { + if (dimensionsBuilder_ == null) { + return dimensions_.get(index); + } else { + return dimensionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsOrBuilderList() { + if (dimensionsBuilder_ != null) { + return dimensionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensions_); + } + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder() { + return getDimensionsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public com.google.analytics.data.v1beta.Dimension.Builder addDimensionsBuilder(int index) { + return getDimensionsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Dimension.getDefaultInstance()); + } + /** + * + * + *
+     * The dimensions requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + public java.util.List + getDimensionsBuilderList() { + return getDimensionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder> + getDimensionsFieldBuilder() { + if (dimensionsBuilder_ == null) { + dimensionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Dimension, + com.google.analytics.data.v1beta.Dimension.Builder, + com.google.analytics.data.v1beta.DimensionOrBuilder>( + dimensions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dimensions_ = null; + } + return dimensionsBuilder_; + } + + private java.util.List metrics_ = + java.util.Collections.emptyList(); + + private void ensureMetricsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metrics_ = new java.util.ArrayList(metrics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + metricsBuilder_; + + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsList() { + if (metricsBuilder_ == null) { + return java.util.Collections.unmodifiableList(metrics_); + } else { + return metricsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public int getMetricsCount() { + if (metricsBuilder_ == null) { + return metrics_.size(); + } else { + return metricsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric getMetrics(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.set(index, value); + onChanged(); + } else { + metricsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder setMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.set(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(value); + onChanged(); + } else { + metricsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(int index, com.google.analytics.data.v1beta.Metric value) { + if (metricsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricsIsMutable(); + metrics_.add(index, value); + onChanged(); + } else { + metricsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics(com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addMetrics( + int index, com.google.analytics.data.v1beta.Metric.Builder builderForValue) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.add(index, builderForValue.build()); + onChanged(); + } else { + metricsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder addAllMetrics( + java.lang.Iterable values) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metrics_); + onChanged(); + } else { + metricsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder clearMetrics() { + if (metricsBuilder_ == null) { + metrics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public Builder removeMetrics(int index) { + if (metricsBuilder_ == null) { + ensureMetricsIsMutable(); + metrics_.remove(index); + onChanged(); + } else { + metricsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder getMetricsBuilder(int index) { + return getMetricsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index) { + if (metricsBuilder_ == null) { + return metrics_.get(index); + } else { + return metricsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List + getMetricsOrBuilderList() { + if (metricsBuilder_ != null) { + return metricsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metrics_); + } + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder() { + return getMetricsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public com.google.analytics.data.v1beta.Metric.Builder addMetricsBuilder(int index) { + return getMetricsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Metric.getDefaultInstance()); + } + /** + * + * + *
+     * The metrics requested and displayed.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + public java.util.List getMetricsBuilderList() { + return getMetricsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder> + getMetricsFieldBuilder() { + if (metricsBuilder_ == null) { + metricsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Metric, + com.google.analytics.data.v1beta.Metric.Builder, + com.google.analytics.data.v1beta.MetricOrBuilder>( + metrics_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + metrics_ = null; + } + return metricsBuilder_; + } + + private java.util.List dateRanges_ = + java.util.Collections.emptyList(); + + private void ensureDateRangesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + dateRanges_ = + new java.util.ArrayList(dateRanges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + dateRangesBuilder_; + + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List getDateRangesList() { + if (dateRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dateRanges_); + } else { + return dateRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public int getDateRangesCount() { + if (dateRangesBuilder_ == null) { + return dateRanges_.size(); + } else { + return dateRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange getDateRanges(int index) { + if (dateRangesBuilder_ == null) { + return dateRanges_.get(index); + } else { + return dateRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder setDateRanges(int index, com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.set(index, value); + onChanged(); + } else { + dateRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder setDateRanges( + int index, com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges(com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.add(value); + onChanged(); + } else { + dateRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges(int index, com.google.analytics.data.v1beta.DateRange value) { + if (dateRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDateRangesIsMutable(); + dateRanges_.add(index, value); + onChanged(); + } else { + dateRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges( + com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.add(builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addDateRanges( + int index, com.google.analytics.data.v1beta.DateRange.Builder builderForValue) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + dateRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder addAllDateRanges( + java.lang.Iterable values) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dateRanges_); + onChanged(); + } else { + dateRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder clearDateRanges() { + if (dateRangesBuilder_ == null) { + dateRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + dateRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public Builder removeDateRanges(int index) { + if (dateRangesBuilder_ == null) { + ensureDateRangesIsMutable(); + dateRanges_.remove(index); + onChanged(); + } else { + dateRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder getDateRangesBuilder(int index) { + return getDateRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index) { + if (dateRangesBuilder_ == null) { + return dateRanges_.get(index); + } else { + return dateRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List + getDateRangesOrBuilderList() { + if (dateRangesBuilder_ != null) { + return dateRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dateRanges_); + } + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder addDateRangesBuilder() { + return getDateRangesFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DateRange.getDefaultInstance()); + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public com.google.analytics.data.v1beta.DateRange.Builder addDateRangesBuilder(int index) { + return getDateRangesFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DateRange.getDefaultInstance()); + } + /** + * + * + *
+     * Date ranges of data 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 event data for the overlapping days is included in the
+     * response rows for both date ranges. In a cohort request, this `dateRanges`
+     * must be unspecified.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + public java.util.List + getDateRangesBuilderList() { + return getDateRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder> + getDateRangesFieldBuilder() { + if (dateRangesBuilder_ == null) { + dateRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DateRange, + com.google.analytics.data.v1beta.DateRange.Builder, + com.google.analytics.data.v1beta.DateRangeOrBuilder>( + dateRanges_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + dateRanges_ = null; + } + return dateRangesBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression dimensionFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + dimensionFilterBuilder_; + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return Whether the dimensionFilter field is set. + */ + public boolean hasDimensionFilter() { + return dimensionFilterBuilder_ != null || dimensionFilter_ != null; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return The dimensionFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } else { + return dimensionFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public Builder setDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dimensionFilter_ = value; + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public Builder setDimensionFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = builderForValue.build(); + onChanged(); + } else { + dimensionFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public Builder mergeDimensionFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (dimensionFilterBuilder_ == null) { + if (dimensionFilter_ != null) { + dimensionFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(dimensionFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + dimensionFilter_ = value; + } + onChanged(); + } else { + dimensionFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public Builder clearDimensionFilter() { + if (dimensionFilterBuilder_ == null) { + dimensionFilter_ = null; + onChanged(); + } else { + dimensionFilter_ = null; + dimensionFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getDimensionFilterBuilder() { + + onChanged(); + return getDimensionFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder + getDimensionFilterOrBuilder() { + if (dimensionFilterBuilder_ != null) { + return dimensionFilterBuilder_.getMessageOrBuilder(); + } else { + return dimensionFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : dimensionFilter_; + } + } + /** + * + * + *
+     * The filter clause of dimensions. Dimensions must be requested to be used in
+     * this filter. Metrics cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getDimensionFilterFieldBuilder() { + if (dimensionFilterBuilder_ == null) { + dimensionFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getDimensionFilter(), getParentForChildren(), isClean()); + dimensionFilter_ = null; + } + return dimensionFilterBuilder_; + } + + private com.google.analytics.data.v1beta.FilterExpression metricFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + metricFilterBuilder_; + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return Whether the metricFilter field is set. + */ + public boolean hasMetricFilter() { + return metricFilterBuilder_ != null || metricFilter_ != null; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return The metricFilter. + */ + public com.google.analytics.data.v1beta.FilterExpression getMetricFilter() { + if (metricFilterBuilder_ == null) { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } else { + return metricFilterBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public Builder setMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metricFilter_ = value; + onChanged(); + } else { + metricFilterBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public Builder setMetricFilter( + com.google.analytics.data.v1beta.FilterExpression.Builder builderForValue) { + if (metricFilterBuilder_ == null) { + metricFilter_ = builderForValue.build(); + onChanged(); + } else { + metricFilterBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public Builder mergeMetricFilter(com.google.analytics.data.v1beta.FilterExpression value) { + if (metricFilterBuilder_ == null) { + if (metricFilter_ != null) { + metricFilter_ = + com.google.analytics.data.v1beta.FilterExpression.newBuilder(metricFilter_) + .mergeFrom(value) + .buildPartial(); + } else { + metricFilter_ = value; + } + onChanged(); + } else { + metricFilterBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public Builder clearMetricFilter() { + if (metricFilterBuilder_ == null) { + metricFilter_ = null; + onChanged(); + } else { + metricFilter_ = null; + metricFilterBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public com.google.analytics.data.v1beta.FilterExpression.Builder getMetricFilterBuilder() { + + onChanged(); + return getMetricFilterFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + public com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder() { + if (metricFilterBuilder_ != null) { + return metricFilterBuilder_.getMessageOrBuilder(); + } else { + return metricFilter_ == null + ? com.google.analytics.data.v1beta.FilterExpression.getDefaultInstance() + : metricFilter_; + } + } + /** + * + * + *
+     * The filter clause of metrics. Applied at post aggregation phase, similar to
+     * SQL having-clause. Metrics must be requested to be used in this filter.
+     * Dimensions cannot be used in this filter.
+     * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder> + getMetricFilterFieldBuilder() { + if (metricFilterBuilder_ == null) { + metricFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.FilterExpression, + com.google.analytics.data.v1beta.FilterExpression.Builder, + com.google.analytics.data.v1beta.FilterExpressionOrBuilder>( + getMetricFilter(), getParentForChildren(), isClean()); + metricFilter_ = null; + } + return metricFilterBuilder_; + } + + private int pageSize_; + /** + * + * + *
+     * Page size is for paging and specifies maximum number of rows to return. The
+     * API returns a maximum of 200,000 rows per request, no matter how many you
+     * ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * int32 page_size = 7; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Page size is for paging and specifies maximum number of rows to return. The
+     * API returns a maximum of 200,000 rows per request, no matter how many you
+     * ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * int32 page_size = 7; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Page size is for paging and specifies maximum number of rows to return. The
+     * API returns a maximum of 200,000 rows per request, no matter how many you
+     * ask for. Page size must be positive.
+     * The API can also return fewer rows than the requested `pageSize`, if there
+     * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * int32 page_size = 7; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A continuation token to get the next page of the results. Adding this to
+     * the request will return the next page of rows after the `pageToken`. The
+     * `pageToken` should be the value returned in the `nextPageToken` parameter
+     * in the response.
+     * When paginating, all other parameters specified in `RunReportRequest` must
+     * match the call that provided the page token.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string page_token = 8; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A continuation token to get the next page of the results. Adding this to
+     * the request will return the next page of rows after the `pageToken`. The
+     * `pageToken` should be the value returned in the `nextPageToken` parameter
+     * in the response.
+     * When paginating, all other parameters specified in `RunReportRequest` must
+     * match the call that provided the page token.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string page_token = 8; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A continuation token to get the next page of the results. Adding this to
+     * the request will return the next page of rows after the `pageToken`. The
+     * `pageToken` should be the value returned in the `nextPageToken` parameter
+     * in the response.
+     * When paginating, all other parameters specified in `RunReportRequest` must
+     * match the call that provided the page token.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string page_token = 8; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A continuation token to get the next page of the results. Adding this to
+     * the request will return the next page of rows after the `pageToken`. The
+     * `pageToken` should be the value returned in the `nextPageToken` parameter
+     * in the response.
+     * When paginating, all other parameters specified in `RunReportRequest` must
+     * match the call that provided the page token.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string page_token = 8; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A continuation token to get the next page of the results. Adding this to
+     * the request will return the next page of rows after the `pageToken`. The
+     * `pageToken` should be the value returned in the `nextPageToken` parameter
+     * in the response.
+     * When paginating, all other parameters specified in `RunReportRequest` must
+     * match the call that provided the page token.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string page_token = 8; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.util.List metricAggregations_ = + java.util.Collections.emptyList(); + + private void ensureMetricAggregationsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + metricAggregations_ = new java.util.ArrayList(metricAggregations_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @return A list containing the metricAggregations. + */ + public java.util.List + getMetricAggregationsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.analytics.data.v1beta.MetricAggregation>( + metricAggregations_, metricAggregations_converter_); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @return The count of metricAggregations. + */ + public int getMetricAggregationsCount() { + return metricAggregations_.size(); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + public com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index) { + return metricAggregations_converter_.convert(metricAggregations_.get(index)); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param index The index to set the value at. + * @param value The metricAggregations to set. + * @return This builder for chaining. + */ + public Builder setMetricAggregations( + int index, com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param value The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregations(com.google.analytics.data.v1beta.MetricAggregation value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param values The metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregations( + java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (com.google.analytics.data.v1beta.MetricAggregation value : values) { + metricAggregations_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @return This builder for chaining. + */ + public Builder clearMetricAggregations() { + metricAggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + public java.util.List getMetricAggregationsValueList() { + return java.util.Collections.unmodifiableList(metricAggregations_); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + public int getMetricAggregationsValue(int index) { + return metricAggregations_.get(index); + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + * @return This builder for chaining. + */ + public Builder setMetricAggregationsValue(int index, int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param value The enum numeric value on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addMetricAggregationsValue(int value) { + ensureMetricAggregationsIsMutable(); + metricAggregations_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Aggregation of metrics. Aggregated metric values will be shown in rows
+     * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * + * @param values The enum numeric values on the wire for metricAggregations to add. + * @return This builder for chaining. + */ + public Builder addAllMetricAggregationsValue(java.lang.Iterable values) { + ensureMetricAggregationsIsMutable(); + for (int value : values) { + metricAggregations_.add(value); + } + onChanged(); + return this; + } + + private java.util.List orderBys_ = + java.util.Collections.emptyList(); + + private void ensureOrderBysIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + orderBys_ = new java.util.ArrayList(orderBys_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + orderBysBuilder_; + + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public java.util.List getOrderBysList() { + if (orderBysBuilder_ == null) { + return java.util.Collections.unmodifiableList(orderBys_); + } else { + return orderBysBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public int getOrderBysCount() { + if (orderBysBuilder_ == null) { + return orderBys_.size(); + } else { + return orderBysBuilder_.getCount(); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public com.google.analytics.data.v1beta.OrderBy getOrderBys(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder setOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.set(index, value); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder setOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.set(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(value); + onChanged(); + } else { + orderBysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder addOrderBys(int index, com.google.analytics.data.v1beta.OrderBy value) { + if (orderBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrderBysIsMutable(); + orderBys_.add(index, value); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder addOrderBys(com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder addOrderBys( + int index, com.google.analytics.data.v1beta.OrderBy.Builder builderForValue) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.add(index, builderForValue.build()); + onChanged(); + } else { + orderBysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder addAllOrderBys( + java.lang.Iterable values) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, orderBys_); + onChanged(); + } else { + orderBysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder clearOrderBys() { + if (orderBysBuilder_ == null) { + orderBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + orderBysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public Builder removeOrderBys(int index) { + if (orderBysBuilder_ == null) { + ensureOrderBysIsMutable(); + orderBys_.remove(index); + onChanged(); + } else { + orderBysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder getOrderBysBuilder(int index) { + return getOrderBysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index) { + if (orderBysBuilder_ == null) { + return orderBys_.get(index); + } else { + return orderBysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public java.util.List + getOrderBysOrBuilderList() { + if (orderBysBuilder_ != null) { + return orderBysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orderBys_); + } + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder() { + return getOrderBysFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public com.google.analytics.data.v1beta.OrderBy.Builder addOrderBysBuilder(int index) { + return getOrderBysFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.OrderBy.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies how rows are ordered in the response.
+     * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + public java.util.List + getOrderBysBuilderList() { + return getOrderBysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder> + getOrderBysFieldBuilder() { + if (orderBysBuilder_ == null) { + orderBysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.OrderBy, + com.google.analytics.data.v1beta.OrderBy.Builder, + com.google.analytics.data.v1beta.OrderByOrBuilder>( + orderBys_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + orderBys_ = null; + } + return orderBysBuilder_; + } + + private java.lang.Object currencyCode_ = ""; + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 11; + * + * @return The currencyCode. + */ + public java.lang.String getCurrencyCode() { + java.lang.Object ref = currencyCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currencyCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 11; + * + * @return The bytes for currencyCode. + */ + public com.google.protobuf.ByteString getCurrencyCodeBytes() { + java.lang.Object ref = currencyCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currencyCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 11; + * + * @param value The currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + currencyCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 11; + * + * @return This builder for chaining. + */ + public Builder clearCurrencyCode() { + + currencyCode_ = getDefaultInstance().getCurrencyCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+     * If the field is empty, the report uses the property's default currency.
+     * 
+ * + * string currency_code = 11; + * + * @param value The bytes for currencyCode to set. + * @return This builder for chaining. + */ + public Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + currencyCode_ = value; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.CohortSpec cohortSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder> + cohortSpecBuilder_; + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return Whether the cohortSpec field is set. + */ + public boolean hasCohortSpec() { + return cohortSpecBuilder_ != null || cohortSpec_ != null; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return The cohortSpec. + */ + public com.google.analytics.data.v1beta.CohortSpec getCohortSpec() { + if (cohortSpecBuilder_ == null) { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } else { + return cohortSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public Builder setCohortSpec(com.google.analytics.data.v1beta.CohortSpec value) { + if (cohortSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cohortSpec_ = value; + onChanged(); + } else { + cohortSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public Builder setCohortSpec( + com.google.analytics.data.v1beta.CohortSpec.Builder builderForValue) { + if (cohortSpecBuilder_ == null) { + cohortSpec_ = builderForValue.build(); + onChanged(); + } else { + cohortSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public Builder mergeCohortSpec(com.google.analytics.data.v1beta.CohortSpec value) { + if (cohortSpecBuilder_ == null) { + if (cohortSpec_ != null) { + cohortSpec_ = + com.google.analytics.data.v1beta.CohortSpec.newBuilder(cohortSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + cohortSpec_ = value; + } + onChanged(); + } else { + cohortSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public Builder clearCohortSpec() { + if (cohortSpecBuilder_ == null) { + cohortSpec_ = null; + onChanged(); + } else { + cohortSpec_ = null; + cohortSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public com.google.analytics.data.v1beta.CohortSpec.Builder getCohortSpecBuilder() { + + onChanged(); + return getCohortSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + public com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder() { + if (cohortSpecBuilder_ != null) { + return cohortSpecBuilder_.getMessageOrBuilder(); + } else { + return cohortSpec_ == null + ? com.google.analytics.data.v1beta.CohortSpec.getDefaultInstance() + : cohortSpec_; + } + } + /** + * + * + *
+     * Cohort group associated with this request. If there is a cohort group
+     * in the request the 'cohort' dimension must be present.
+     * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder> + getCohortSpecFieldBuilder() { + if (cohortSpecBuilder_ == null) { + cohortSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.CohortSpec, + com.google.analytics.data.v1beta.CohortSpec.Builder, + com.google.analytics.data.v1beta.CohortSpecOrBuilder>( + getCohortSpec(), getParentForChildren(), isClean()); + cohortSpec_ = null; + } + return cohortSpecBuilder_; + } + + private boolean keepEmptyRows_; + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 13; + * + * @return The keepEmptyRows. + */ + @java.lang.Override + public boolean getKeepEmptyRows() { + return keepEmptyRows_; + } + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 13; + * + * @param value The keepEmptyRows to set. + * @return This builder for chaining. + */ + public Builder setKeepEmptyRows(boolean value) { + + keepEmptyRows_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If false or unspecified, each row with all metrics equal to 0 will not be
+     * returned. If true, these rows will be returned if they are not separately
+     * removed by a filter.
+     * 
+ * + * bool keep_empty_rows = 13; + * + * @return This builder for chaining. + */ + public Builder clearKeepEmptyRows() { + + keepEmptyRows_ = false; + onChanged(); + return this; + } + + private boolean returnPropertyQuota_; + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 14; + * + * @return The returnPropertyQuota. + */ + @java.lang.Override + public boolean getReturnPropertyQuota() { + return returnPropertyQuota_; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 14; + * + * @param value The returnPropertyQuota to set. + * @return This builder for chaining. + */ + public Builder setReturnPropertyQuota(boolean value) { + + returnPropertyQuota_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Toggles whether to return the current state of this Analytics Property's
+     * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+     * 
+ * + * bool return_property_quota = 14; + * + * @return This builder for chaining. + */ + public Builder clearReturnPropertyQuota() { + + returnPropertyQuota_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunReportRequest) + private static final com.google.analytics.data.v1beta.RunReportRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunReportRequest(); + } + + public static com.google.analytics.data.v1beta.RunReportRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunReportRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequestOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequestOrBuilder.java new file mode 100644 index 00000000..3885b951 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequestOrBuilder.java @@ -0,0 +1,592 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * A Google Analytics GA4 property identifier whose events are tracked.
+   * Specified in the URL path and not the body. To learn more, see [where to
+   * find your Property
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
+   * Within a batch request, this property should either be unspecified or
+   * consistent with the batch-level property.
+   * Example: properties/1234
+   * 
+ * + * string property = 1; + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List getDimensionsList(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.Dimension getDimensions(int index); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + int getDimensionsCount(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + java.util.List + getDimensionsOrBuilderList(); + /** + * + * + *
+   * The dimensions requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Dimension dimensions = 2; + */ + com.google.analytics.data.v1beta.DimensionOrBuilder getDimensionsOrBuilder(int index); + + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List getMetricsList(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.Metric getMetrics(int index); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + int getMetricsCount(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + java.util.List + getMetricsOrBuilderList(); + /** + * + * + *
+   * The metrics requested and displayed.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Metric metrics = 3; + */ + com.google.analytics.data.v1beta.MetricOrBuilder getMetricsOrBuilder(int index); + + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + java.util.List getDateRangesList(); + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + com.google.analytics.data.v1beta.DateRange getDateRanges(int index); + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + int getDateRangesCount(); + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + java.util.List + getDateRangesOrBuilderList(); + /** + * + * + *
+   * Date ranges of data 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 event data for the overlapping days is included in the
+   * response rows for both date ranges. In a cohort request, this `dateRanges`
+   * must be unspecified.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DateRange date_ranges = 4; + */ + com.google.analytics.data.v1beta.DateRangeOrBuilder getDateRangesOrBuilder(int index); + + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return Whether the dimensionFilter field is set. + */ + boolean hasDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + * + * @return The dimensionFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getDimensionFilter(); + /** + * + * + *
+   * The filter clause of dimensions. Dimensions must be requested to be used in
+   * this filter. Metrics cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression dimension_filter = 5; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getDimensionFilterOrBuilder(); + + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return Whether the metricFilter field is set. + */ + boolean hasMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + * + * @return The metricFilter. + */ + com.google.analytics.data.v1beta.FilterExpression getMetricFilter(); + /** + * + * + *
+   * The filter clause of metrics. Applied at post aggregation phase, similar to
+   * SQL having-clause. Metrics must be requested to be used in this filter.
+   * Dimensions cannot be used in this filter.
+   * 
+ * + * .google.analytics.data.v1beta.FilterExpression metric_filter = 6; + */ + com.google.analytics.data.v1beta.FilterExpressionOrBuilder getMetricFilterOrBuilder(); + + /** + * + * + *
+   * Page size is for paging and specifies maximum number of rows to return. The
+   * API returns a maximum of 200,000 rows per request, no matter how many you
+   * ask for. Page size must be positive.
+   * The API can also return fewer rows than the requested `pageSize`, if there
+   * aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * int32 page_size = 7; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A continuation token to get the next page of the results. Adding this to
+   * the request will return the next page of rows after the `pageToken`. The
+   * `pageToken` should be the value returned in the `nextPageToken` parameter
+   * in the response.
+   * When paginating, all other parameters specified in `RunReportRequest` must
+   * match the call that provided the page token.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string page_token = 8; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A continuation token to get the next page of the results. Adding this to
+   * the request will return the next page of rows after the `pageToken`. The
+   * `pageToken` should be the value returned in the `nextPageToken` parameter
+   * in the response.
+   * When paginating, all other parameters specified in `RunReportRequest` must
+   * match the call that provided the page token.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string page_token = 8; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return A list containing the metricAggregations. + */ + java.util.List getMetricAggregationsList(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return The count of metricAggregations. + */ + int getMetricAggregationsCount(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @param index The index of the element to return. + * @return The metricAggregations at the given index. + */ + com.google.analytics.data.v1beta.MetricAggregation getMetricAggregations(int index); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @return A list containing the enum numeric values on the wire for metricAggregations. + */ + java.util.List getMetricAggregationsValueList(); + /** + * + * + *
+   * Aggregation of metrics. Aggregated metric values will be shown in rows
+   * where the dimension_values are set to "RESERVED_(MetricAggregation)".
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricAggregation metric_aggregations = 9; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of metricAggregations at the given index. + */ + int getMetricAggregationsValue(int index); + + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + java.util.List getOrderBysList(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + com.google.analytics.data.v1beta.OrderBy getOrderBys(int index); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + int getOrderBysCount(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + java.util.List + getOrderBysOrBuilderList(); + /** + * + * + *
+   * Specifies how rows are ordered in the response.
+   * 
+ * + * repeated .google.analytics.data.v1beta.OrderBy order_bys = 10; + */ + com.google.analytics.data.v1beta.OrderByOrBuilder getOrderBysOrBuilder(int index); + + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 11; + * + * @return The currencyCode. + */ + java.lang.String getCurrencyCode(); + /** + * + * + *
+   * A currency code in ISO4217 format, such as "AED", "USD", "JPY".
+   * If the field is empty, the report uses the property's default currency.
+   * 
+ * + * string currency_code = 11; + * + * @return The bytes for currencyCode. + */ + com.google.protobuf.ByteString getCurrencyCodeBytes(); + + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return Whether the cohortSpec field is set. + */ + boolean hasCohortSpec(); + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + * + * @return The cohortSpec. + */ + com.google.analytics.data.v1beta.CohortSpec getCohortSpec(); + /** + * + * + *
+   * Cohort group associated with this request. If there is a cohort group
+   * in the request the 'cohort' dimension must be present.
+   * 
+ * + * .google.analytics.data.v1beta.CohortSpec cohort_spec = 12; + */ + com.google.analytics.data.v1beta.CohortSpecOrBuilder getCohortSpecOrBuilder(); + + /** + * + * + *
+   * If false or unspecified, each row with all metrics equal to 0 will not be
+   * returned. If true, these rows will be returned if they are not separately
+   * removed by a filter.
+   * 
+ * + * bool keep_empty_rows = 13; + * + * @return The keepEmptyRows. + */ + boolean getKeepEmptyRows(); + + /** + * + * + *
+   * Toggles whether to return the current state of this Analytics Property's
+   * quota. Quota is returned in [PropertyQuota](#PropertyQuota).
+   * 
+ * + * bool return_property_quota = 14; + * + * @return The returnPropertyQuota. + */ + boolean getReturnPropertyQuota(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponse.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponse.java new file mode 100644 index 00000000..f05556f7 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponse.java @@ -0,0 +1,4332 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +/** + * + * + *
+ * The response report table corresponding to a request.
+ * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunReportResponse} + */ +public final class RunReportResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.data.v1beta.RunReportResponse) + RunReportResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunReportResponse.newBuilder() to construct. + private RunReportResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunReportResponse() { + dimensionHeaders_ = java.util.Collections.emptyList(); + metricHeaders_ = java.util.Collections.emptyList(); + rows_ = java.util.Collections.emptyList(); + totals_ = java.util.Collections.emptyList(); + maximums_ = java.util.Collections.emptyList(); + minimums_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunReportResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunReportResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dimensionHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.DimensionHeader.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + metricHeaders_.add( + input.readMessage( + com.google.analytics.data.v1beta.MetricHeader.parser(), extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + rows_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + totals_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + totals_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + maximums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + maximums_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + minimums_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + minimums_.add( + input.readMessage( + com.google.analytics.data.v1beta.Row.parser(), extensionRegistry)); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + case 64: + { + totalSize_ = input.readInt32(); + break; + } + case 74: + { + com.google.analytics.data.v1beta.ResponseMetaData.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.analytics.data.v1beta.ResponseMetaData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.analytics.data.v1beta.PropertyQuota.Builder subBuilder = null; + if (propertyQuota_ != null) { + subBuilder = propertyQuota_.toBuilder(); + } + propertyQuota_ = + input.readMessage( + com.google.analytics.data.v1beta.PropertyQuota.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(propertyQuota_); + propertyQuota_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + totals_ = java.util.Collections.unmodifiableList(totals_); + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + maximums_ = java.util.Collections.unmodifiableList(maximums_); + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + minimums_ = java.util.Collections.unmodifiableList(minimums_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunReportResponse.class, + com.google.analytics.data.v1beta.RunReportResponse.Builder.class); + } + + public static final int DIMENSION_HEADERS_FIELD_NUMBER = 1; + private java.util.List dimensionHeaders_; + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public java.util.List + getDimensionHeadersOrBuilderList() { + return dimensionHeaders_; + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public int getDimensionHeadersCount() { + return dimensionHeaders_.size(); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + return dimensionHeaders_.get(index); + } + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + return dimensionHeaders_.get(index); + } + + public static final int METRIC_HEADERS_FIELD_NUMBER = 2; + private java.util.List metricHeaders_; + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public java.util.List getMetricHeadersList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public java.util.List + getMetricHeadersOrBuilderList() { + return metricHeaders_; + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public int getMetricHeadersCount() { + return metricHeaders_.size(); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + return metricHeaders_.get(index); + } + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + return metricHeaders_.get(index); + } + + public static final int ROWS_FIELD_NUMBER = 3; + private java.util.List rows_; + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public java.util.List getRowsList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public int getRowsCount() { + return rows_.size(); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getRows(int index) { + return rows_.get(index); + } + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + return rows_.get(index); + } + + public static final int TOTALS_FIELD_NUMBER = 4; + private java.util.List totals_; + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public java.util.List getTotalsList() { + return totals_; + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public java.util.List + getTotalsOrBuilderList() { + return totals_; + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public int getTotalsCount() { + return totals_.size(); + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getTotals(int index) { + return totals_.get(index); + } + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index) { + return totals_.get(index); + } + + public static final int MAXIMUMS_FIELD_NUMBER = 5; + private java.util.List maximums_; + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public java.util.List getMaximumsList() { + return maximums_; + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public java.util.List + getMaximumsOrBuilderList() { + return maximums_; + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public int getMaximumsCount() { + return maximums_.size(); + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getMaximums(int index) { + return maximums_.get(index); + } + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index) { + return maximums_.get(index); + } + + public static final int MINIMUMS_FIELD_NUMBER = 6; + private java.util.List minimums_; + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public java.util.List getMinimumsList() { + return minimums_; + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public java.util.List + getMinimumsOrBuilderList() { + return minimums_; + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public int getMinimumsCount() { + return minimums_.size(); + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.Row getMinimums(int index) { + return minimums_.get(index); + } + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index) { + return minimums_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 7; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+   * call to retrieve the next page of report rows. If this field is omitted,
+   * there are no subsequent pages of report rows.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string next_page_token = 7; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+   * call to retrieve the next page of report rows. If this field is omitted,
+   * there are no subsequent pages of report rows.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string next_page_token = 7; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 8; + private int totalSize_; + /** + * + * + *
+   * The total number of rows in the query result. `totalSize` is independent of
+   * the number of rows returned in the response, the `pageSize` request
+   * parameter, and the `pageToken` request parameter. For example if a query
+   * returns 175 rows and includes `pageSize` of 50 in the API request, the
+   * response will contain `totalSize` 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 total_size = 8; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + + public static final int METADATA_FIELD_NUMBER = 9; + private com.google.analytics.data.v1beta.ResponseMetaData metadata_; + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return The metadata. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaData getMetadata() { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + public static final int PROPERTY_QUOTA_FIELD_NUMBER = 10; + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return Whether the propertyQuota field is set. + */ + @java.lang.Override + public boolean hasPropertyQuota() { + return propertyQuota_ != null; + } + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return The propertyQuota. + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + @java.lang.Override + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + return getPropertyQuota(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dimensionHeaders_.size(); i++) { + output.writeMessage(1, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + output.writeMessage(2, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(3, rows_.get(i)); + } + for (int i = 0; i < totals_.size(); i++) { + output.writeMessage(4, totals_.get(i)); + } + for (int i = 0; i < maximums_.size(); i++) { + output.writeMessage(5, maximums_.get(i)); + } + for (int i = 0; i < minimums_.size(); i++) { + output.writeMessage(6, minimums_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, nextPageToken_); + } + if (totalSize_ != 0) { + output.writeInt32(8, totalSize_); + } + if (metadata_ != null) { + output.writeMessage(9, getMetadata()); + } + if (propertyQuota_ != null) { + output.writeMessage(10, getPropertyQuota()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dimensionHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dimensionHeaders_.get(i)); + } + for (int i = 0; i < metricHeaders_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metricHeaders_.get(i)); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, rows_.get(i)); + } + for (int i = 0; i < totals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, totals_.get(i)); + } + for (int i = 0; i < maximums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, maximums_.get(i)); + } + for (int i = 0; i < minimums_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, minimums_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, nextPageToken_); + } + if (totalSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, totalSize_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMetadata()); + } + if (propertyQuota_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getPropertyQuota()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.data.v1beta.RunReportResponse)) { + return super.equals(obj); + } + com.google.analytics.data.v1beta.RunReportResponse other = + (com.google.analytics.data.v1beta.RunReportResponse) obj; + + if (!getDimensionHeadersList().equals(other.getDimensionHeadersList())) return false; + if (!getMetricHeadersList().equals(other.getMetricHeadersList())) return false; + if (!getRowsList().equals(other.getRowsList())) return false; + if (!getTotalsList().equals(other.getTotalsList())) return false; + if (!getMaximumsList().equals(other.getMaximumsList())) return false; + if (!getMinimumsList().equals(other.getMinimumsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (getTotalSize() != other.getTotalSize()) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (hasPropertyQuota() != other.hasPropertyQuota()) return false; + if (hasPropertyQuota()) { + if (!getPropertyQuota().equals(other.getPropertyQuota())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDimensionHeadersCount() > 0) { + hash = (37 * hash) + DIMENSION_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getDimensionHeadersList().hashCode(); + } + if (getMetricHeadersCount() > 0) { + hash = (37 * hash) + METRIC_HEADERS_FIELD_NUMBER; + hash = (53 * hash) + getMetricHeadersList().hashCode(); + } + if (getRowsCount() > 0) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRowsList().hashCode(); + } + if (getTotalsCount() > 0) { + hash = (37 * hash) + TOTALS_FIELD_NUMBER; + hash = (53 * hash) + getTotalsList().hashCode(); + } + if (getMaximumsCount() > 0) { + hash = (37 * hash) + MAXIMUMS_FIELD_NUMBER; + hash = (53 * hash) + getMaximumsList().hashCode(); + } + if (getMinimumsCount() > 0) { + hash = (37 * hash) + MINIMUMS_FIELD_NUMBER; + hash = (53 * hash) + getMinimumsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTotalSize(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + if (hasPropertyQuota()) { + hash = (37 * hash) + PROPERTY_QUOTA_FIELD_NUMBER; + hash = (53 * hash) + getPropertyQuota().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.data.v1beta.RunReportResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.data.v1beta.RunReportResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response report table corresponding to a request.
+   * 
+ * + * Protobuf type {@code google.analytics.data.v1beta.RunReportResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1beta.RunReportResponse) + com.google.analytics.data.v1beta.RunReportResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.data.v1beta.RunReportResponse.class, + com.google.analytics.data.v1beta.RunReportResponse.Builder.class); + } + + // Construct using com.google.analytics.data.v1beta.RunReportResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDimensionHeadersFieldBuilder(); + getMetricHeadersFieldBuilder(); + getRowsFieldBuilder(); + getTotalsFieldBuilder(); + getMaximumsFieldBuilder(); + getMinimumsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dimensionHeadersBuilder_.clear(); + } + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + metricHeadersBuilder_.clear(); + } + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rowsBuilder_.clear(); + } + if (totalsBuilder_ == null) { + totals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + totalsBuilder_.clear(); + } + if (maximumsBuilder_ == null) { + maximums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + maximumsBuilder_.clear(); + } + if (minimumsBuilder_ == null) { + minimums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + minimumsBuilder_.clear(); + } + nextPageToken_ = ""; + + totalSize_ = 0; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.data.v1beta.AnalyticsDataApiProto + .internal_static_google_analytics_data_v1beta_RunReportResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponse getDefaultInstanceForType() { + return com.google.analytics.data.v1beta.RunReportResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponse build() { + com.google.analytics.data.v1beta.RunReportResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponse buildPartial() { + com.google.analytics.data.v1beta.RunReportResponse result = + new com.google.analytics.data.v1beta.RunReportResponse(this); + int from_bitField0_ = bitField0_; + if (dimensionHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = java.util.Collections.unmodifiableList(dimensionHeaders_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dimensionHeaders_ = dimensionHeaders_; + } else { + result.dimensionHeaders_ = dimensionHeadersBuilder_.build(); + } + if (metricHeadersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = java.util.Collections.unmodifiableList(metricHeaders_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metricHeaders_ = metricHeaders_; + } else { + result.metricHeaders_ = metricHeadersBuilder_.build(); + } + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } + if (totalsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + totals_ = java.util.Collections.unmodifiableList(totals_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.totals_ = totals_; + } else { + result.totals_ = totalsBuilder_.build(); + } + if (maximumsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + maximums_ = java.util.Collections.unmodifiableList(maximums_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.maximums_ = maximums_; + } else { + result.maximums_ = maximumsBuilder_.build(); + } + if (minimumsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + minimums_ = java.util.Collections.unmodifiableList(minimums_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.minimums_ = minimums_; + } else { + result.minimums_ = minimumsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.totalSize_ = totalSize_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + if (propertyQuotaBuilder_ == null) { + result.propertyQuota_ = propertyQuota_; + } else { + result.propertyQuota_ = propertyQuotaBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.data.v1beta.RunReportResponse) { + return mergeFrom((com.google.analytics.data.v1beta.RunReportResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.data.v1beta.RunReportResponse other) { + if (other == com.google.analytics.data.v1beta.RunReportResponse.getDefaultInstance()) + return this; + if (dimensionHeadersBuilder_ == null) { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeaders_.isEmpty()) { + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.addAll(other.dimensionHeaders_); + } + onChanged(); + } + } else { + if (!other.dimensionHeaders_.isEmpty()) { + if (dimensionHeadersBuilder_.isEmpty()) { + dimensionHeadersBuilder_.dispose(); + dimensionHeadersBuilder_ = null; + dimensionHeaders_ = other.dimensionHeaders_; + bitField0_ = (bitField0_ & ~0x00000001); + dimensionHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDimensionHeadersFieldBuilder() + : null; + } else { + dimensionHeadersBuilder_.addAllMessages(other.dimensionHeaders_); + } + } + } + if (metricHeadersBuilder_ == null) { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeaders_.isEmpty()) { + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetricHeadersIsMutable(); + metricHeaders_.addAll(other.metricHeaders_); + } + onChanged(); + } + } else { + if (!other.metricHeaders_.isEmpty()) { + if (metricHeadersBuilder_.isEmpty()) { + metricHeadersBuilder_.dispose(); + metricHeadersBuilder_ = null; + metricHeaders_ = other.metricHeaders_; + bitField0_ = (bitField0_ & ~0x00000002); + metricHeadersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMetricHeadersFieldBuilder() + : null; + } else { + metricHeadersBuilder_.addAllMessages(other.metricHeaders_); + } + } + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000004); + rowsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRowsFieldBuilder() + : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } + } + if (totalsBuilder_ == null) { + if (!other.totals_.isEmpty()) { + if (totals_.isEmpty()) { + totals_ = other.totals_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureTotalsIsMutable(); + totals_.addAll(other.totals_); + } + onChanged(); + } + } else { + if (!other.totals_.isEmpty()) { + if (totalsBuilder_.isEmpty()) { + totalsBuilder_.dispose(); + totalsBuilder_ = null; + totals_ = other.totals_; + bitField0_ = (bitField0_ & ~0x00000008); + totalsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTotalsFieldBuilder() + : null; + } else { + totalsBuilder_.addAllMessages(other.totals_); + } + } + } + if (maximumsBuilder_ == null) { + if (!other.maximums_.isEmpty()) { + if (maximums_.isEmpty()) { + maximums_ = other.maximums_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureMaximumsIsMutable(); + maximums_.addAll(other.maximums_); + } + onChanged(); + } + } else { + if (!other.maximums_.isEmpty()) { + if (maximumsBuilder_.isEmpty()) { + maximumsBuilder_.dispose(); + maximumsBuilder_ = null; + maximums_ = other.maximums_; + bitField0_ = (bitField0_ & ~0x00000010); + maximumsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMaximumsFieldBuilder() + : null; + } else { + maximumsBuilder_.addAllMessages(other.maximums_); + } + } + } + if (minimumsBuilder_ == null) { + if (!other.minimums_.isEmpty()) { + if (minimums_.isEmpty()) { + minimums_ = other.minimums_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMinimumsIsMutable(); + minimums_.addAll(other.minimums_); + } + onChanged(); + } + } else { + if (!other.minimums_.isEmpty()) { + if (minimumsBuilder_.isEmpty()) { + minimumsBuilder_.dispose(); + minimumsBuilder_ = null; + minimums_ = other.minimums_; + bitField0_ = (bitField0_ & ~0x00000020); + minimumsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getMinimumsFieldBuilder() + : null; + } else { + minimumsBuilder_.addAllMessages(other.minimums_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (other.getTotalSize() != 0) { + setTotalSize(other.getTotalSize()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.hasPropertyQuota()) { + mergePropertyQuota(other.getPropertyQuota()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.data.v1beta.RunReportResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.data.v1beta.RunReportResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dimensionHeaders_ = + java.util.Collections.emptyList(); + + private void ensureDimensionHeadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dimensionHeaders_ = + new java.util.ArrayList( + dimensionHeaders_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + dimensionHeadersBuilder_; + + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersList() { + if (dimensionHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } else { + return dimensionHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public int getDimensionHeadersCount() { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.size(); + } else { + return dimensionHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder setDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders(com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader value) { + if (dimensionHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, value); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addDimensionHeaders( + int index, com.google.analytics.data.v1beta.DimensionHeader.Builder builderForValue) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + dimensionHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder addAllDimensionHeaders( + java.lang.Iterable values) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dimensionHeaders_); + onChanged(); + } else { + dimensionHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder clearDimensionHeaders() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dimensionHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public Builder removeDimensionHeaders(int index) { + if (dimensionHeadersBuilder_ == null) { + ensureDimensionHeadersIsMutable(); + dimensionHeaders_.remove(index); + onChanged(); + } else { + dimensionHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder getDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder( + int index) { + if (dimensionHeadersBuilder_ == null) { + return dimensionHeaders_.get(index); + } else { + return dimensionHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersOrBuilderList() { + if (dimensionHeadersBuilder_ != null) { + return dimensionHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dimensionHeaders_); + } + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder() { + return getDimensionHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public com.google.analytics.data.v1beta.DimensionHeader.Builder addDimensionHeadersBuilder( + int index) { + return getDimensionHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.DimensionHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes dimension columns. The number of DimensionHeaders and ordering of
+     * DimensionHeaders matches the dimensions present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + public java.util.List + getDimensionHeadersBuilderList() { + return getDimensionHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder> + getDimensionHeadersFieldBuilder() { + if (dimensionHeadersBuilder_ == null) { + dimensionHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.DimensionHeader, + com.google.analytics.data.v1beta.DimensionHeader.Builder, + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder>( + dimensionHeaders_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dimensionHeaders_ = null; + } + return dimensionHeadersBuilder_; + } + + private java.util.List metricHeaders_ = + java.util.Collections.emptyList(); + + private void ensureMetricHeadersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + metricHeaders_ = + new java.util.ArrayList(metricHeaders_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + metricHeadersBuilder_; + + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List getMetricHeadersList() { + if (metricHeadersBuilder_ == null) { + return java.util.Collections.unmodifiableList(metricHeaders_); + } else { + return metricHeadersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public int getMetricHeadersCount() { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.size(); + } else { + return metricHeadersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, value); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder setMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.set(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders(com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader value) { + if (metricHeadersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, value); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addMetricHeaders( + int index, com.google.analytics.data.v1beta.MetricHeader.Builder builderForValue) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.add(index, builderForValue.build()); + onChanged(); + } else { + metricHeadersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder addAllMetricHeaders( + java.lang.Iterable values) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metricHeaders_); + onChanged(); + } else { + metricHeadersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder clearMetricHeaders() { + if (metricHeadersBuilder_ == null) { + metricHeaders_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + metricHeadersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public Builder removeMetricHeaders(int index) { + if (metricHeadersBuilder_ == null) { + ensureMetricHeadersIsMutable(); + metricHeaders_.remove(index); + onChanged(); + } else { + metricHeadersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder getMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder( + int index) { + if (metricHeadersBuilder_ == null) { + return metricHeaders_.get(index); + } else { + return metricHeadersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List + getMetricHeadersOrBuilderList() { + if (metricHeadersBuilder_ != null) { + return metricHeadersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(metricHeaders_); + } + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder() { + return getMetricHeadersFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public com.google.analytics.data.v1beta.MetricHeader.Builder addMetricHeadersBuilder( + int index) { + return getMetricHeadersFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.MetricHeader.getDefaultInstance()); + } + /** + * + * + *
+     * Describes metric columns. The number of MetricHeaders and ordering of
+     * MetricHeaders matches the metrics present in rows.
+     * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + public java.util.List + getMetricHeadersBuilderList() { + return getMetricHeadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder> + getMetricHeadersFieldBuilder() { + if (metricHeadersBuilder_ == null) { + metricHeadersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.MetricHeader, + com.google.analytics.data.v1beta.MetricHeader.Builder, + com.google.analytics.data.v1beta.MetricHeaderOrBuilder>( + metricHeaders_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + metricHeaders_ = null; + } + return metricHeadersBuilder_; + } + + private java.util.List rows_ = + java.util.Collections.emptyList(); + + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + rowsBuilder_; + + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder setRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder setRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(int index, com.google.analytics.data.v1beta.Row value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addRows( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder getRowsBuilder(int index) { + return getRowsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder() { + return getRowsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public com.google.analytics.data.v1beta.Row.Builder addRowsBuilder(int index) { + return getRowsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * Rows of dimension value combinations and metric values in the report.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + public java.util.List getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + rows_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + private java.util.List totals_ = + java.util.Collections.emptyList(); + + private void ensureTotalsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + totals_ = new java.util.ArrayList(totals_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + totalsBuilder_; + + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List getTotalsList() { + if (totalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(totals_); + } else { + return totalsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public int getTotalsCount() { + if (totalsBuilder_ == null) { + return totals_.size(); + } else { + return totalsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row getTotals(int index) { + if (totalsBuilder_ == null) { + return totals_.get(index); + } else { + return totalsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder setTotals(int index, com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.set(index, value); + onChanged(); + } else { + totalsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder setTotals( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.set(index, builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.add(value); + onChanged(); + } else { + totalsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(int index, com.google.analytics.data.v1beta.Row value) { + if (totalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTotalsIsMutable(); + totals_.add(index, value); + onChanged(); + } else { + totalsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.add(builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addTotals( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.add(index, builderForValue.build()); + onChanged(); + } else { + totalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder addAllTotals( + java.lang.Iterable values) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, totals_); + onChanged(); + } else { + totalsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder clearTotals() { + if (totalsBuilder_ == null) { + totals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + totalsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public Builder removeTotals(int index) { + if (totalsBuilder_ == null) { + ensureTotalsIsMutable(); + totals_.remove(index); + onChanged(); + } else { + totalsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder getTotalsBuilder(int index) { + return getTotalsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index) { + if (totalsBuilder_ == null) { + return totals_.get(index); + } else { + return totalsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List + getTotalsOrBuilderList() { + if (totalsBuilder_ != null) { + return totalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(totals_); + } + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addTotalsBuilder() { + return getTotalsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public com.google.analytics.data.v1beta.Row.Builder addTotalsBuilder(int index) { + return getTotalsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the totaled values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + public java.util.List getTotalsBuilderList() { + return getTotalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getTotalsFieldBuilder() { + if (totalsBuilder_ == null) { + totalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + totals_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + totals_ = null; + } + return totalsBuilder_; + } + + private java.util.List maximums_ = + java.util.Collections.emptyList(); + + private void ensureMaximumsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + maximums_ = new java.util.ArrayList(maximums_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + maximumsBuilder_; + + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List getMaximumsList() { + if (maximumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(maximums_); + } else { + return maximumsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public int getMaximumsCount() { + if (maximumsBuilder_ == null) { + return maximums_.size(); + } else { + return maximumsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row getMaximums(int index) { + if (maximumsBuilder_ == null) { + return maximums_.get(index); + } else { + return maximumsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder setMaximums(int index, com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.set(index, value); + onChanged(); + } else { + maximumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder setMaximums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.set(index, builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.add(value); + onChanged(); + } else { + maximumsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(int index, com.google.analytics.data.v1beta.Row value) { + if (maximumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMaximumsIsMutable(); + maximums_.add(index, value); + onChanged(); + } else { + maximumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.add(builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addMaximums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.add(index, builderForValue.build()); + onChanged(); + } else { + maximumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder addAllMaximums( + java.lang.Iterable values) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, maximums_); + onChanged(); + } else { + maximumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder clearMaximums() { + if (maximumsBuilder_ == null) { + maximums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + maximumsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public Builder removeMaximums(int index) { + if (maximumsBuilder_ == null) { + ensureMaximumsIsMutable(); + maximums_.remove(index); + onChanged(); + } else { + maximumsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder getMaximumsBuilder(int index) { + return getMaximumsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index) { + if (maximumsBuilder_ == null) { + return maximums_.get(index); + } else { + return maximumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List + getMaximumsOrBuilderList() { + if (maximumsBuilder_ != null) { + return maximumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(maximums_); + } + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addMaximumsBuilder() { + return getMaximumsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public com.google.analytics.data.v1beta.Row.Builder addMaximumsBuilder(int index) { + return getMaximumsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the maximum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + public java.util.List getMaximumsBuilderList() { + return getMaximumsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getMaximumsFieldBuilder() { + if (maximumsBuilder_ == null) { + maximumsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + maximums_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + maximums_ = null; + } + return maximumsBuilder_; + } + + private java.util.List minimums_ = + java.util.Collections.emptyList(); + + private void ensureMinimumsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + minimums_ = new java.util.ArrayList(minimums_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + minimumsBuilder_; + + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List getMinimumsList() { + if (minimumsBuilder_ == null) { + return java.util.Collections.unmodifiableList(minimums_); + } else { + return minimumsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public int getMinimumsCount() { + if (minimumsBuilder_ == null) { + return minimums_.size(); + } else { + return minimumsBuilder_.getCount(); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row getMinimums(int index) { + if (minimumsBuilder_ == null) { + return minimums_.get(index); + } else { + return minimumsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder setMinimums(int index, com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.set(index, value); + onChanged(); + } else { + minimumsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder setMinimums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.set(index, builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.add(value); + onChanged(); + } else { + minimumsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(int index, com.google.analytics.data.v1beta.Row value) { + if (minimumsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMinimumsIsMutable(); + minimums_.add(index, value); + onChanged(); + } else { + minimumsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums(com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.add(builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addMinimums( + int index, com.google.analytics.data.v1beta.Row.Builder builderForValue) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.add(index, builderForValue.build()); + onChanged(); + } else { + minimumsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder addAllMinimums( + java.lang.Iterable values) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, minimums_); + onChanged(); + } else { + minimumsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder clearMinimums() { + if (minimumsBuilder_ == null) { + minimums_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + minimumsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public Builder removeMinimums(int index) { + if (minimumsBuilder_ == null) { + ensureMinimumsIsMutable(); + minimums_.remove(index); + onChanged(); + } else { + minimumsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder getMinimumsBuilder(int index) { + return getMinimumsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index) { + if (minimumsBuilder_ == null) { + return minimums_.get(index); + } else { + return minimumsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List + getMinimumsOrBuilderList() { + if (minimumsBuilder_ != null) { + return minimumsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(minimums_); + } + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder addMinimumsBuilder() { + return getMinimumsFieldBuilder() + .addBuilder(com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public com.google.analytics.data.v1beta.Row.Builder addMinimumsBuilder(int index) { + return getMinimumsFieldBuilder() + .addBuilder(index, com.google.analytics.data.v1beta.Row.getDefaultInstance()); + } + /** + * + * + *
+     * If requested, the minimum values of metrics.
+     * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + public java.util.List getMinimumsBuilderList() { + return getMinimumsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder> + getMinimumsFieldBuilder() { + if (minimumsBuilder_ == null) { + minimumsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.data.v1beta.Row, + com.google.analytics.data.v1beta.Row.Builder, + com.google.analytics.data.v1beta.RowOrBuilder>( + minimums_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + minimums_ = null; + } + return minimumsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+     * call to retrieve the next page of report rows. If this field is omitted,
+     * there are no subsequent pages of report rows.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string next_page_token = 7; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+     * call to retrieve the next page of report rows. If this field is omitted,
+     * there are no subsequent pages of report rows.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string next_page_token = 7; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+     * call to retrieve the next page of report rows. If this field is omitted,
+     * there are no subsequent pages of report rows.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string next_page_token = 7; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+     * call to retrieve the next page of report rows. If this field is omitted,
+     * there are no subsequent pages of report rows.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string next_page_token = 7; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+     * call to retrieve the next page of report rows. If this field is omitted,
+     * there are no subsequent pages of report rows.
+     * To learn more about this pagination parameter, see
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+     * 
+ * + * string next_page_token = 7; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private int totalSize_; + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response, the `pageSize` request
+     * parameter, and the `pageToken` request parameter. For example if a query
+     * returns 175 rows and includes `pageSize` of 50 in the API request, the
+     * response will contain `totalSize` 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 total_size = 8; + * + * @return The totalSize. + */ + @java.lang.Override + public int getTotalSize() { + return totalSize_; + } + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response, the `pageSize` request
+     * parameter, and the `pageToken` request parameter. For example if a query
+     * returns 175 rows and includes `pageSize` of 50 in the API request, the
+     * response will contain `totalSize` 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 total_size = 8; + * + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(int value) { + + totalSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of rows in the query result. `totalSize` is independent of
+     * the number of rows returned in the response, the `pageSize` request
+     * parameter, and the `pageToken` request parameter. For example if a query
+     * returns 175 rows and includes `pageSize` of 50 in the API request, the
+     * response will contain `totalSize` 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 total_size = 8; + * + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + + totalSize_ = 0; + onChanged(); + return this; + } + + private com.google.analytics.data.v1beta.ResponseMetaData metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return The metadata. + */ + public com.google.analytics.data.v1beta.ResponseMetaData getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public Builder setMetadata(com.google.analytics.data.v1beta.ResponseMetaData value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public Builder setMetadata( + com.google.analytics.data.v1beta.ResponseMetaData.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public Builder mergeMetadata(com.google.analytics.data.v1beta.ResponseMetaData value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.analytics.data.v1beta.ResponseMetaData.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public com.google.analytics.data.v1beta.ResponseMetaData.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + public com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.analytics.data.v1beta.ResponseMetaData.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Metadata for the report.
+     * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.ResponseMetaData, + com.google.analytics.data.v1beta.ResponseMetaData.Builder, + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + private com.google.analytics.data.v1beta.PropertyQuota propertyQuota_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + propertyQuotaBuilder_; + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return Whether the propertyQuota field is set. + */ + public boolean hasPropertyQuota() { + return propertyQuotaBuilder_ != null || propertyQuota_ != null; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return The propertyQuota. + */ + public com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } else { + return propertyQuotaBuilder_.getMessage(); + } + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public Builder setPropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + propertyQuota_ = value; + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public Builder setPropertyQuota( + com.google.analytics.data.v1beta.PropertyQuota.Builder builderForValue) { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = builderForValue.build(); + onChanged(); + } else { + propertyQuotaBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public Builder mergePropertyQuota(com.google.analytics.data.v1beta.PropertyQuota value) { + if (propertyQuotaBuilder_ == null) { + if (propertyQuota_ != null) { + propertyQuota_ = + com.google.analytics.data.v1beta.PropertyQuota.newBuilder(propertyQuota_) + .mergeFrom(value) + .buildPartial(); + } else { + propertyQuota_ = value; + } + onChanged(); + } else { + propertyQuotaBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public Builder clearPropertyQuota() { + if (propertyQuotaBuilder_ == null) { + propertyQuota_ = null; + onChanged(); + } else { + propertyQuota_ = null; + propertyQuotaBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public com.google.analytics.data.v1beta.PropertyQuota.Builder getPropertyQuotaBuilder() { + + onChanged(); + return getPropertyQuotaFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + public com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder() { + if (propertyQuotaBuilder_ != null) { + return propertyQuotaBuilder_.getMessageOrBuilder(); + } else { + return propertyQuota_ == null + ? com.google.analytics.data.v1beta.PropertyQuota.getDefaultInstance() + : propertyQuota_; + } + } + /** + * + * + *
+     * This Analytics Property's quota state including this request.
+     * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder> + getPropertyQuotaFieldBuilder() { + if (propertyQuotaBuilder_ == null) { + propertyQuotaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.analytics.data.v1beta.PropertyQuota, + com.google.analytics.data.v1beta.PropertyQuota.Builder, + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder>( + getPropertyQuota(), getParentForChildren(), isClean()); + propertyQuota_ = null; + } + return propertyQuotaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1beta.RunReportResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.data.v1beta.RunReportResponse) + private static final com.google.analytics.data.v1beta.RunReportResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.data.v1beta.RunReportResponse(); + } + + public static com.google.analytics.data.v1beta.RunReportResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunReportResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunReportResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.data.v1beta.RunReportResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponseOrBuilder.java b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponseOrBuilder.java new file mode 100644 index 00000000..d217536f --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponseOrBuilder.java @@ -0,0 +1,467 @@ +/* + * Copyright 2020 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/data/v1beta/analytics_data_api.proto + +package com.google.analytics.data.v1beta; + +public interface RunReportResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1beta.RunReportResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + java.util.List getDimensionHeadersList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + com.google.analytics.data.v1beta.DimensionHeader getDimensionHeaders(int index); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + int getDimensionHeadersCount(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + java.util.List + getDimensionHeadersOrBuilderList(); + /** + * + * + *
+   * Describes dimension columns. The number of DimensionHeaders and ordering of
+   * DimensionHeaders matches the dimensions present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.DimensionHeader dimension_headers = 1; + */ + com.google.analytics.data.v1beta.DimensionHeaderOrBuilder getDimensionHeadersOrBuilder(int index); + + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + java.util.List getMetricHeadersList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + com.google.analytics.data.v1beta.MetricHeader getMetricHeaders(int index); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + int getMetricHeadersCount(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + java.util.List + getMetricHeadersOrBuilderList(); + /** + * + * + *
+   * Describes metric columns. The number of MetricHeaders and ordering of
+   * MetricHeaders matches the metrics present in rows.
+   * 
+ * + * repeated .google.analytics.data.v1beta.MetricHeader metric_headers = 2; + */ + com.google.analytics.data.v1beta.MetricHeaderOrBuilder getMetricHeadersOrBuilder(int index); + + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + java.util.List getRowsList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + com.google.analytics.data.v1beta.Row getRows(int index); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + int getRowsCount(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + java.util.List getRowsOrBuilderList(); + /** + * + * + *
+   * Rows of dimension value combinations and metric values in the report.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row rows = 3; + */ + com.google.analytics.data.v1beta.RowOrBuilder getRowsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + java.util.List getTotalsList(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + com.google.analytics.data.v1beta.Row getTotals(int index); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + int getTotalsCount(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + java.util.List getTotalsOrBuilderList(); + /** + * + * + *
+   * If requested, the totaled values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row totals = 4; + */ + com.google.analytics.data.v1beta.RowOrBuilder getTotalsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + java.util.List getMaximumsList(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + com.google.analytics.data.v1beta.Row getMaximums(int index); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + int getMaximumsCount(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + java.util.List + getMaximumsOrBuilderList(); + /** + * + * + *
+   * If requested, the maximum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row maximums = 5; + */ + com.google.analytics.data.v1beta.RowOrBuilder getMaximumsOrBuilder(int index); + + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + java.util.List getMinimumsList(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + com.google.analytics.data.v1beta.Row getMinimums(int index); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + int getMinimumsCount(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + java.util.List + getMinimumsOrBuilderList(); + /** + * + * + *
+   * If requested, the minimum values of metrics.
+   * 
+ * + * repeated .google.analytics.data.v1beta.Row minimums = 6; + */ + com.google.analytics.data.v1beta.RowOrBuilder getMinimumsOrBuilder(int index); + + /** + * + * + *
+   * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+   * call to retrieve the next page of report rows. If this field is omitted,
+   * there are no subsequent pages of report rows.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string next_page_token = 7; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token that can be sent as `pageToken` in a subsequent `RunReportRequest`
+   * call to retrieve the next page of report rows. If this field is omitted,
+   * there are no subsequent pages of report rows.
+   * To learn more about this pagination parameter, see
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
+   * 
+ * + * string next_page_token = 7; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * The total number of rows in the query result. `totalSize` is independent of
+   * the number of rows returned in the response, the `pageSize` request
+   * parameter, and the `pageToken` request parameter. For example if a query
+   * returns 175 rows and includes `pageSize` of 50 in the API request, the
+   * response will contain `totalSize` 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 total_size = 8; + * + * @return The totalSize. + */ + int getTotalSize(); + + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + * + * @return The metadata. + */ + com.google.analytics.data.v1beta.ResponseMetaData getMetadata(); + /** + * + * + *
+   * Metadata for the report.
+   * 
+ * + * .google.analytics.data.v1beta.ResponseMetaData metadata = 9; + */ + com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return Whether the propertyQuota field is set. + */ + boolean hasPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + * + * @return The propertyQuota. + */ + com.google.analytics.data.v1beta.PropertyQuota getPropertyQuota(); + /** + * + * + *
+   * This Analytics Property's quota state including this request.
+   * 
+ * + * .google.analytics.data.v1beta.PropertyQuota property_quota = 10; + */ + com.google.analytics.data.v1beta.PropertyQuotaOrBuilder getPropertyQuotaOrBuilder(); +} diff --git a/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/analytics_data_api.proto b/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/analytics_data_api.proto new file mode 100644 index 00000000..18010889 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/analytics_data_api.proto @@ -0,0 +1,534 @@ +// Copyright 2021 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.data.v1beta; + +import "google/analytics/data/v1beta/data.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsDataApiProto"; +option java_package = "com.google.analytics.data.v1beta"; + +// Google Analytics reporting data service. +service BetaAnalyticsData { + option (google.api.default_host) = "analyticsdata.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Returns a customized report of your Google Analytics event data. Reports + // contain statistics derived from data collected by the Google Analytics + // tracking code. The data returned from the API is as a table with columns + // for the requested dimensions and metrics. Metrics are individual + // measurements of user activity on your property, such as active users or + // event count. Dimensions break down metrics across some common criteria, + // such as country or event name. + rpc RunReport(RunReportRequest) returns (RunReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runReport" + body: "*" + }; + } + + // Returns a customized pivot report of your Google Analytics event data. + // Pivot reports are more advanced and expressive formats than regular + // reports. In a pivot report, dimensions are only visible if they are + // included in a pivot. Multiple pivots can be specified to further dissect + // your data. + rpc RunPivotReport(RunPivotReportRequest) returns (RunPivotReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runPivotReport" + body: "*" + }; + } + + // Returns multiple reports in a batch. All reports must be for the same + // GA4 Property. + rpc BatchRunReports(BatchRunReportsRequest) returns (BatchRunReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunReports" + body: "*" + }; + } + + // Returns multiple pivot reports in a batch. All reports must be for the same + // GA4 Property. + rpc BatchRunPivotReports(BatchRunPivotReportsRequest) returns (BatchRunPivotReportsResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:batchRunPivotReports" + body: "*" + }; + } + + // Returns metadata for dimensions and metrics available in reporting methods. + // Used to explore the dimensions and metrics. In this method, a Google + // Analytics GA4 Property Identifier is specified in the request, and + // the metadata response includes Custom dimensions and metrics as well as + // Universal metadata. + // + // For example if a custom metric with parameter name `levels_unlocked` is + // registered to a property, the Metadata response will contain + // `customEvent:levels_unlocked`. Universal metadata are dimensions and + // metrics applicable to any property such as `country` and `totalUsers`. + rpc GetMetadata(GetMetadataRequest) returns (Metadata) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/metadata}" + }; + option (google.api.method_signature) = "name"; + } + + // The Google Analytics Realtime API returns a customized report of realtime + // event data for your property. These reports show events and usage from the + // last 30 minutes. + rpc RunRealtimeReport(RunRealtimeReportRequest) returns (RunRealtimeReportResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:runRealtimeReport" + body: "*" + }; + } +} + +// The dimensions and metrics currently accepted in reporting methods. +message Metadata { + option (google.api.resource) = { + type: "analyticsdata.googleapis.com/Metadata" + pattern: "properties/{property}/metadata" + }; + + // Resource name of this metadata. + string name = 3; + + // The dimension descriptions. + repeated DimensionMetadata dimensions = 1; + + // The metric descriptions. + repeated MetricMetadata metrics = 2; +} + +// The request to generate a report. +message RunReportRequest { + // A Google Analytics GA4 property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // Date ranges of data 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 event data for the overlapping days is included in the + // response rows for both date ranges. In a cohort request, this `dateRanges` + // must be unspecified. + repeated DateRange date_ranges = 4; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 5; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 6; + + // Page size is for paging and specifies maximum number of rows to return. The + // API returns a maximum of 200,000 rows per request, no matter how many you + // ask for. Page size must be positive. + // + // The API can also return fewer rows than the requested `pageSize`, if there + // aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 page_size = 7; + + // A continuation token to get the next page of the results. Adding this to + // the request will return the next page of rows after the `pageToken`. The + // `pageToken` should be the value returned in the `nextPageToken` parameter + // in the response. + // + // When paginating, all other parameters specified in `RunReportRequest` must + // match the call that provided the page token. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + string page_token = 8; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 9; + + // Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 10; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 11; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 12; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + bool keep_empty_rows = 13; + + // Toggles whether to return the current state of this Analytics Property's + // quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 14; +} + +// The response report table corresponding to a request. +message RunReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // A token that can be sent as `pageToken` in a subsequent `RunReportRequest` + // call to retrieve the next page of report rows. If this field is omitted, + // there are no subsequent pages of report rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + string next_page_token = 7; + + // The total number of rows in the query result. `totalSize` is independent of + // the number of rows returned in the response, the `pageSize` request + // parameter, and the `pageToken` request parameter. For example if a query + // returns 175 rows and includes `pageSize` of 50 in the API request, the + // response will contain `totalSize` 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 total_size = 8; + + // Metadata for the report. + ResponseMetaData metadata = 9; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 10; +} + +// The request to generate a pivot report. +message RunPivotReportRequest { + // A Google Analytics GA4 property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // Within a batch request, this property should either be unspecified or + // consistent with the batch-level property. + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested. All defined dimensions must be used by one of the + // following: dimension_expression, dimension_filter, pivots, order_bys. + repeated Dimension dimensions = 2; + + // The metrics requested, at least one metric needs to be specified. All + // defined metrics must be used by one of the following: metric_expression, + // metric_filter, order_bys. + repeated Metric metrics = 3; + + // The date range to retrieve event data for the report. If multiple date + // ranges are specified, event data from each date range is used in the + // report. A special dimension with field name "dateRange" can be included in + // a Pivot's field names; if included, the report compares between date + // ranges. In a cohort request, this `dateRanges` must be unspecified. + repeated DateRange date_ranges = 4; + + // Describes the visual format of the report's dimensions in columns or rows. + // The union of the fieldNames (dimension names) in all pivots must be a + // subset of dimension names defined in Dimensions. No two pivots can share a + // dimension. A dimension is only visible if it appears in a pivot. + repeated Pivot pivots = 5; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 6; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 7; + + // A currency code in ISO4217 format, such as "AED", "USD", "JPY". + // If the field is empty, the report uses the property's default currency. + string currency_code = 8; + + // Cohort group associated with this request. If there is a cohort group + // in the request the 'cohort' dimension must be present. + CohortSpec cohort_spec = 9; + + // If false or unspecified, each row with all metrics equal to 0 will not be + // returned. If true, these rows will be returned if they are not separately + // removed by a filter. + bool keep_empty_rows = 10; + + // Toggles whether to return the current state of this Analytics Property's + // quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 11; +} + +// The response pivot report table corresponding to a pivot request. +message RunPivotReportResponse { + // Summarizes the columns and rows created by a pivot. Each pivot in the + // request produces one header in the response. If we have a request like + // this: + // + // "pivots": [{ + // "fieldNames": ["country", + // "city"] + // }, + // { + // "fieldNames": "eventName" + // }] + // + // We will have the following `pivotHeaders` in the response: + // + // "pivotHeaders" : [{ + // "dimensionHeaders": [{ + // "dimensionValues": [ + // { "value": "United Kingdom" }, + // { "value": "London" } + // ] + // }, + // { + // "dimensionValues": [ + // { "value": "Japan" }, + // { "value": "Osaka" } + // ] + // }] + // }, + // { + // "dimensionHeaders": [{ + // "dimensionValues": [{ "value": "session_start" }] + // }, + // { + // "dimensionValues": [{ "value": "scroll" }] + // }] + // }] + repeated PivotHeader pivot_headers = 1; + + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 2; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 3; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 4; + + // Aggregation of metric values. Can be totals, minimums, or maximums. The + // returned aggregations are controlled by the metric_aggregations in the + // pivot. The type of aggregation returned in each row is shown by the + // dimension_values which are set to "RESERVED_". + repeated Row aggregates = 5; + + // Metadata for the report. + ResponseMetaData metadata = 6; + + // This Analytics Property's quota state including this request. + PropertyQuota property_quota = 7; +} + +// The batch request containing multiple report requests. +message BatchRunReportsRequest { + // A Google Analytics GA4 property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate report response. Each + // batch request is allowed up to 5 requests. + repeated RunReportRequest requests = 2; +} + +// The batch response containing multiple reports. +message BatchRunReportsResponse { + // Individual responses. Each response has a separate report request. + repeated RunReportResponse reports = 1; +} + +// The batch request containing multiple pivot report requests. +message BatchRunPivotReportsRequest { + // A Google Analytics GA4 property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // This property must be specified for the batch. The property within + // RunPivotReportRequest may either be unspecified or consistent with this + // property. + // + // Example: properties/1234 + string property = 1; + + // Individual requests. Each request has a separate pivot report response. + // Each batch request is allowed up to 5 requests. + repeated RunPivotReportRequest requests = 2; +} + +// The batch response containing multiple pivot reports. +message BatchRunPivotReportsResponse { + // Individual responses. Each response has a separate pivot report request. + repeated RunPivotReportResponse pivot_reports = 1; +} + +// Request for a property's dimension and metric metadata. +message GetMetadataRequest { + // Required. The resource name of the metadata to retrieve. This name field is + // specified in the URL path and not URL parameters. Property is a numeric + // Google Analytics GA4 Property identifier. To learn more, see [where to find + // your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234/metadata + // + // Set the Property ID to 0 for dimensions and metrics common to all + // properties. In this special mode, this method will not return custom + // dimensions and metrics. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsdata.googleapis.com/Metadata" + } + ]; +} + +// The request to generate a realtime report. +message RunRealtimeReportRequest { + // A Google Analytics GA4 property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see [where to + // find your Property + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). + // + // Example: properties/1234 + string property = 1; + + // The dimensions requested and displayed. + repeated Dimension dimensions = 2; + + // The metrics requested and displayed. + repeated Metric metrics = 3; + + // The filter clause of dimensions. Dimensions must be requested to be used in + // this filter. Metrics cannot be used in this filter. + FilterExpression dimension_filter = 4; + + // The filter clause of metrics. Applied at post aggregation phase, similar to + // SQL having-clause. Metrics must be requested to be used in this filter. + // Dimensions cannot be used in this filter. + FilterExpression metric_filter = 5; + + // Page size specifies maximum number of rows to return. If unspecified, up to + // 10,000 rows are returned. The API returns a maximum of 100,000 rows per + // request, no matter how many you ask for. Page size must be positive. + // + // The API can also return fewer rows than the requested `pageSize`, if there + // aren't as many dimension values as the `pageSize`. 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 `pageSize` to a higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics#pagination). + int32 page_size = 6; + + // Aggregation of metrics. Aggregated metric values will be shown in rows + // where the dimension_values are set to "RESERVED_(MetricAggregation)". + repeated MetricAggregation metric_aggregations = 7; + + // Specifies how rows are ordered in the response. + repeated OrderBy order_bys = 8; + + // Toggles whether to return the current state of this Analytics Property's + // Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota). + bool return_property_quota = 9; +} + +// The response realtime report table corresponding to a request. +message RunRealtimeReportResponse { + // Describes dimension columns. The number of DimensionHeaders and ordering of + // DimensionHeaders matches the dimensions present in rows. + repeated DimensionHeader dimension_headers = 1; + + // Describes metric columns. The number of MetricHeaders and ordering of + // MetricHeaders matches the metrics present in rows. + repeated MetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated Row rows = 3; + + // If requested, the totaled values of metrics. + repeated Row totals = 4; + + // If requested, the maximum values of metrics. + repeated Row maximums = 5; + + // If requested, the minimum values of metrics. + repeated Row minimums = 6; + + // The total number of rows in the query result. `totalSize` is independent of + // the number of rows returned in the response and the `pageSize` request + // parameter. For example if a query returns 175 rows and includes `pageSize` + // of 50 in the API request, the response will contain `totalSize` of 175 but + // only 50 rows. + int32 total_size = 7; + + // This Analytics Property's Realtime quota state including this request. + PropertyQuota property_quota = 8; +} diff --git a/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/data.proto b/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/data.proto new file mode 100644 index 00000000..ad0f21c2 --- /dev/null +++ b/proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/data.proto @@ -0,0 +1,793 @@ +// Copyright 2021 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.data.v1beta; + +option go_package = "google.golang.org/genproto/googleapis/analytics/data/v1beta;data"; +option java_multiple_files = true; +option java_outer_classname = "ReportingApiProto"; +option java_package = "com.google.analytics.data.v1beta"; + +// A contiguous set of days: startDate, startDate + 1, ..., endDate. Requests +// are allowed up to 4 date ranges. +message DateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `end_date`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the property's + // reporting time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `start_date`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the + // property's reporting time zone. + string end_date = 2; + + // Assigns a name to this date range. The dimension `dateRange` is valued to + // this name in a report response. If set, cannot begin with `date_range_` or + // `RESERVED_`. If not set, date ranges are named by their zero based index in + // the request: `date_range_0`, `date_range_1`, etc. + string name = 3; +} + +// Dimensions are attributes of your data. For example, the dimension city +// indicates the city from which an event originates. Dimension values in report +// responses are strings; for example, city could be "Paris" or "New York". +// Requests are allowed up to 8 dimensions. +message Dimension { + // The name of the dimension. See the [API + // Dimensions](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#dimensions) + // for the list of dimension names. + // + // If `dimensionExpression` is specified, `name` can be any string that you + // would like within the allowed character set. For example if a + // `dimensionExpression` concatenates `country` and `city`, you could call + // that dimension `countryAndCity`. Dimension names that you choose must match + // the regular expression "^[a-zA-Z0-9_]$". + // + // Dimensions are referenced by `name` in `dimensionFilter`, `orderBys`, + // `dimensionExpression`, and `pivots`. + string name = 1; + + // One dimension can be the result of an expression of multiple dimensions. + // For example, dimension "country, city": concatenate(country, ", ", city). + DimensionExpression dimension_expression = 2; +} + +// Used to express a dimension which is the result of a formula of multiple +// dimensions. Example usages: +// 1) lower_case(dimension) +// 2) concatenate(dimension1, symbol, dimension2). +message DimensionExpression { + // Used to convert a dimension value to a single case. + message CaseExpression { + // Name of a dimension. The name must refer back to a name in dimensions + // field of the request. + string dimension_name = 1; + } + + // Used to combine dimension values to a single dimension. + message ConcatenateExpression { + // Names of dimensions. The names must refer back to names in the dimensions + // field of the request. + repeated string dimension_names = 1; + + // The delimiter placed between dimension names. + // + // Delimiters are often single characters such as "|" or "," but can be + // longer strings. If a dimension value contains the delimiter, both will be + // present in response with no distinction. For example if dimension 1 value + // = "US,FR", dimension 2 value = "JP", and delimiter = ",", then the + // response will contain "US,FR,JP". + string delimiter = 2; + } + + // Specify one type of dimension expression for `DimensionExpression`. + oneof one_expression { + // Used to convert a dimension value to lower case. + CaseExpression lower_case = 4; + + // Used to convert a dimension value to upper case. + CaseExpression upper_case = 5; + + // Used to combine dimension values to a single dimension. + // For example, dimension "country, city": concatenate(country, ", ", city). + ConcatenateExpression concatenate = 6; + } +} + +// The quantitative measurements of a report. For example, the metric +// `eventCount` is the total number of events. Requests are allowed up to 10 +// metrics. +message Metric { + // The name of the metric. See the [API + // Metrics](https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema#metrics) + // for the list of metric names. + // + // If `expression` is specified, `name` can be any string that you would like + // within the allowed character set. For example if `expression` is + // `screenPageViews/sessions`, you could call that metric's name = + // `viewsPerSession`. Metric names that you choose must match the regular + // expression "^[a-zA-Z0-9_]$". + // + // Metrics are referenced by `name` in `metricFilter`, `orderBys`, and metric + // `expression`. + string name = 1; + + // A mathematical expression for derived metrics. For example, the metric + // Event count per user is `eventCount/totalUsers`. + string expression = 2; + + // Indicates if a metric is invisible in the report response. If a metric is + // invisible, the metric will not produce a column in the response, but can be + // used in `metricFilter`, `orderBys`, or a metric `expression`. + bool invisible = 3; +} + +// To express dimension or metric filters. +// The fields in the same FilterExpression need to be either all dimensions or +// all metrics. +message FilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof expr { + // The FilterExpressions in and_group have an AND relationship. + FilterExpressionList and_group = 1; + + // The FilterExpressions in or_group have an OR relationship. + FilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + FilterExpression not_expression = 3; + + // A primitive filter. + // All fields in filter in same FilterExpression needs to be either all + // dimensions or metrics. + Filter filter = 4; + } +} + +// A list of filter expressions. +message FilterExpressionList { + // A list of filter expressions. + repeated FilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message Filter { + // The filter for string + message StringFilter { + // 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 regular expression match with the string value. + FULL_REGEXP = 5; + + // Partial regular expression match 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 InListFilter { + // 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 NumericFilter { + // 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 BetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; + } + + // The dimension name or metric name. Must be a name defined in dimensions + // or metrics. + string field_name = 1; + + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + StringFilter string_filter = 3; + + // A filter for in list values. + InListFilter in_list_filter = 4; + + // A filter for numeric or date values. + NumericFilter numeric_filter = 5; + + // A filter for two values. + BetweenFilter between_filter = 6; + } +} + +// The sort options. +message OrderBy { + // 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; + } + + // Sorts by a pivot column group. + message PivotOrderBy { + // A pair of dimension names and values. Rows with this dimension pivot pair + // are ordered by the metric's value. + // + // For example if pivots = {{"browser", "Chrome"}} and + // metric_name = "Sessions", + // then the rows will be sorted based on Sessions in Chrome. + // + // ---------|----------|----------------|----------|---------------- + // | Chrome | Chrome | Safari | Safari + // ---------|----------|----------------|----------|---------------- + // Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions + // ---------|----------|----------------|----------|---------------- + // US | 2 | 2 | 3 | 1 + // ---------|----------|----------------|----------|---------------- + // Canada | 3 | 1 | 4 | 1 + // ---------|----------|----------------|----------|---------------- + message PivotSelection { + // Must be a dimension name from the request. + string dimension_name = 1; + + // Order by only when the named dimension is this value. + string dimension_value = 2; + } + + // In the response to order by, order rows by this column. Must be a metric + // name from the request. + string metric_name = 1; + + // Used to select a dimension name and value pivot. If multiple pivot + // selections are given, the sort occurs on rows where all pivot selection + // dimension name and value pairs match the row's dimension name and value + // pair. + repeated PivotSelection pivot_selections = 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; + + // Sorts results by a metric's values within a pivot column group. + PivotOrderBy pivot = 3; + } + + // If true, sorts by descending order. + bool desc = 4; +} + +// Describes the visible dimension columns and rows in the report response. +message Pivot { + // Dimension names for visible columns in the report response. Including + // "dateRange" produces a date range column; for each row in the response, + // dimension values in the date range column will indicate the corresponding + // date range from the request. + repeated string field_names = 1; + + // Specifies how dimensions are ordered in the pivot. In the first Pivot, the + // OrderBys determine Row and PivotDimensionHeader ordering; in subsequent + // Pivots, the OrderBys determine only PivotDimensionHeader ordering. + // Dimensions specified in these OrderBys must be a subset of + // Pivot.field_names. + repeated OrderBy order_bys = 2; + + // The row count of the start row. The first row is counted as row 0. + int64 offset = 3; + + // The number of unique combinations of dimension values to return in this + // pivot. If unspecified, up to 10,000 unique combinations of dimension values + // are returned. `limit` must be positive. + // + // The product of the `limit` for each `pivot` in a `RunPivotReportRequest` + // must not exceed 100,000. For example, a two pivot request with `limit: + // 1000` in each pivot will fail because the product is `1,000,000`. + int64 limit = 4; + + // Aggregate the metrics by dimensions in this pivot using the specified + // metric_aggregations. + repeated MetricAggregation metric_aggregations = 5; +} + +// The specification of cohorts for a cohort report. +// +// Cohort reports create a time series of user retention for the cohort. For +// example, you could select the cohort of users that were acquired in the first +// week of September and follow that cohort for the next six weeks. Selecting +// the users acquired in the first week of September cohort is specified in the +// `cohort` object. Following that cohort for the next six weeks is specified in +// the `cohortsRange` object. +// +// For examples, see [Cohort Report +// Examples](https://developers.google.com/analytics/devguides/reporting/data/v1/advanced#cohort_report_examples). +// +// The report response could show a weekly time series where say your app has +// retained 60% of this cohort after three weeks and 25% of this cohort after +// six weeks. These two percentages can be calculated by the metric +// `cohortActiveUsers/cohortTotalUsers` and will be separate rows in the report. +message CohortSpec { + // Defines the selection criteria to group users into cohorts. + // + // Most cohort reports define only a single cohort. If multiple cohorts are + // specified, each cohort can be recognized in the report by their name. + repeated Cohort cohorts = 1; + + // Cohort reports follow cohorts over an extended reporting date range. This + // range specifies an offset duration to follow the cohorts over. + CohortsRange cohorts_range = 2; + + // Optional settings for a cohort report. + CohortReportSettings cohort_report_settings = 3; +} + +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstSessionDate` +// belong to the same cohort. +message Cohort { + // Assigns a name to this cohort. The dimension `cohort` is valued to this + // name in a report response. If set, cannot begin with `cohort_` or + // `RESERVED_`. If not set, cohorts are named by their zero based index + // `cohort_0`, `cohort_1`, etc. + string name = 1; + + // Dimension used by the cohort. Required and only supports + // `firstSessionDate`. + string dimension = 2; + + // The cohort selects users whose first touch date is between start date and + // end date defined in the `dateRange`. This `dateRange` does not specify the + // full date range of event data that is present in a cohort report. In a + // cohort report, this `dateRange` is extended by the granularity and offset + // present in the `cohortsRange`; event data for the extended reporting date + // range is present in a cohort report. + // + // In a cohort request, this `dateRange` is required and the `dateRanges` in + // the `RunReportRequest` or `RunPivotReportRequest` must be unspecified. + // + // This `dateRange` should generally be aligned with the cohort's granularity. + // If `CohortsRange` uses daily granularity, this `dateRange` can be a single + // day. If `CohortsRange` uses weekly granularity, this `dateRange` can be + // aligned to a week boundary, starting at Sunday and ending Saturday. If + // `CohortsRange` uses monthly granularity, this `dateRange` can be aligned to + // a month, starting at the first and ending on the last day of the month. + DateRange date_range = 3; +} + +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. +message CohortsRange { + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. + enum Granularity { + // Should never be specified. + GRANULARITY_UNSPECIFIED = 0; + + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. + DAILY = 1; + + // Weekly granularity. Commonly used if the cohort's `dateRange` is a week + // in duration (starting on Sunday and ending on Saturday) and the request + // contains `cohortNthWeek`. + WEEKLY = 2; + + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. + MONTHLY = 3; + } + + // Required. The granularity used to interpret the `startOffset` and + // `endOffset` for the extended reporting date range for a cohort report. + Granularity granularity = 1; + + // `startOffset` specifies the start date of the extended reporting date range + // for a cohort report. `startOffset` is commonly set to 0 so that reports + // contain data from the acquisition of the cohort forward. + // + // If `granularity` is `DAILY`, the `startDate` of the extended reporting date + // range is `startDate` of the cohort plus `startOffset` days. + // + // If `granularity` is `WEEKLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `startDate` of the extended reporting + // date range is `startDate` of the cohort plus `startOffset * 30` days. + int32 start_offset = 2; + + // Required. `endOffset` specifies the end date of the extended reporting date + // range for a cohort report. `endOffset` can be any positive integer but is + // commonly set to 5 to 10 so that reports contain data on the cohort for the + // next several granularity time periods. + // + // If `granularity` is `DAILY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset` days. + // + // If `granularity` is `WEEKLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 7` days. + // + // If `granularity` is `MONTHLY`, the `endDate` of the extended reporting date + // range is `endDate` of the cohort plus `endOffset * 30` days. + int32 end_offset = 3; +} + +// Optional settings of a cohort report. +message CohortReportSettings { + // If true, accumulates the result from first touch day to the end day. Not + // supported in `RunReportRequest`. + bool accumulate = 1; +} + +// Response's metadata carrying additional information about the report content. +message ResponseMetaData { + // If true, indicates some buckets of dimension combinations are rolled into + // "(other)" row. This can happen for high cardinality reports. + bool data_loss_from_other_row = 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 DimensionHeader { + // The dimension's name. + string 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 MetricHeader { + // The metric's name. + string name = 1; + + // The metric's data type. + MetricType type = 2; +} + +// Dimensions' values in a single pivot. +message PivotHeader { + // The size is the same as the cardinality of the corresponding dimension + // combinations. + repeated PivotDimensionHeader pivot_dimension_headers = 1; + + // The cardinality of the pivot. The total number of rows for this pivot's + // fields regardless of how the parameters `offset` and `limit` are specified + // in the request. + int32 row_count = 2; +} + +// Summarizes dimension values from a row for this pivot. +message PivotDimensionHeader { + // Values of multiple dimensions in a pivot. + repeated DimensionValue dimension_values = 1; +} + +// Report data for each row. +// For example if RunReportRequest contains: +// +// ```none +// "dimensions": [ +// { +// "name": "eventName" +// }, +// { +// "name": "countryId" +// } +// ], +// "metrics": [ +// { +// "name": "eventCount" +// } +// ] +// ``` +// +// One row with 'in_app_purchase' as the eventName, 'JP' as the countryId, and +// 15 as the eventCount, would be: +// +// ```none +// "dimensionValues": [ +// { +// "value": "in_app_purchase" +// }, +// { +// "value": "JP" +// } +// ], +// "metricValues": [ +// { +// "value": "15" +// } +// ] +// ``` +message Row { + // List of requested dimension values. In a PivotReport, dimension_values + // are only listed for dimensions included in a pivot. + repeated DimensionValue dimension_values = 1; + + // List of requested visible metric values. + repeated MetricValue metric_values = 2; +} + +// The value of a dimension. +message DimensionValue { + // One kind of dimension value + oneof one_value { + // Value as a string if the dimension type is a string. + string value = 1; + } +} + +// The value of a metric. +message MetricValue { + // One of metric value + oneof one_value { + // Measurement value. See MetricHeader for type. + string value = 4; + } +} + +// 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; + } +} + +// 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 PropertyQuota { + // Standard Analytics Properties can use up to 25,000 tokens per day; + // Analytics 360 Properties can use 250,000 tokens per day. Most requests + // consume fewer than 10 tokens. + QuotaStatus tokens_per_day = 1; + + // Standard Analytics Properties can use up to 5,000 tokens per hour; + // Analytics 360 Properties can use 50,000 tokens per hour. An API request + // consumes a single number of tokens, and that number is deducted from both + // the hourly and daily quotas. + QuotaStatus tokens_per_hour = 2; + + // Standard Analytics Properties can send up to 10 concurrent requests; + // Analytics 360 Properties can use up to 50 concurrent requests. + QuotaStatus concurrent_requests = 3; + + // Standard Analytics Properties and cloud project pairs can have up to 10 + // server errors per hour; Analytics 360 Properties and cloud project pairs + // can have up to 50 server errors per hour. + QuotaStatus server_errors_per_project_per_hour = 4; +} + +// Current state for a particular quota group. +message QuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} + +// Explains a dimension. +message DimensionMetadata { + // This dimension's name. Useable in [Dimension](#Dimension)'s `name`. For + // example, `eventName`. + string api_name = 1; + + // This dimension's name within the Google Analytics user interface. For + // example, `Event name`. + string ui_name = 2; + + // Description of how this dimension is used and calculated. + string description = 3; + + // Still usable but deprecated names for this dimension. If populated, this + // dimension is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the dimension will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // True if the dimension is a custom dimension for this property. + bool custom_definition = 5; +} + +// Explains a metric. +message MetricMetadata { + // A metric name. Useable in [Metric](#Metric)'s `name`. For example, + // `eventCount`. + string api_name = 1; + + // This metric's name within the Google Analytics user interface. For example, + // `Event count`. + string ui_name = 2; + + // Description of how this metric is used and calculated. + string description = 3; + + // Still usable but deprecated names for this metric. If populated, this + // metric is available by either `apiName` or one of `deprecatedApiNames` + // for a period of time. After the deprecation period, the metric will be + // available only by `apiName`. + repeated string deprecated_api_names = 4; + + // The type of this metric. + MetricType type = 5; + + // The mathematical expression for this derived metric. Can be used in + // [Metric](#Metric)'s `expression` field for equivalent reports. Most metrics + // are not expressions, and for non-expressions, this field is empty. + string expression = 6; + + // True if the metric is a custom metric for this property. + bool custom_definition = 7; +} + +// Represents aggregation of metrics. +enum MetricAggregation { + // Unspecified operator. + METRIC_AGGREGATION_UNSPECIFIED = 0; + + // SUM operator. + TOTAL = 1; + + // Minimum operator. + MINIMUM = 5; + + // Maximum operator. + MAXIMUM = 6; + + // Count operator. + COUNT = 4; +} + +// A metric's value type. +enum MetricType { + // Unspecified type. + METRIC_TYPE_UNSPECIFIED = 0; + + // Integer type. + TYPE_INTEGER = 1; + + // Floating point type. + TYPE_FLOAT = 2; + + // A duration of seconds; a special floating point type. + TYPE_SECONDS = 4; + + // A duration in milliseconds; a special floating point type. + TYPE_MILLISECONDS = 5; + + // A duration in minutes; a special floating point type. + TYPE_MINUTES = 6; + + // A duration in hours; a special floating point type. + TYPE_HOURS = 7; + + // A custom metric of standard type; a special floating point type. + TYPE_STANDARD = 8; + + // An amount of money; a special floating point type. + TYPE_CURRENCY = 9; + + // A length in feet; a special floating point type. + TYPE_FEET = 10; + + // A length in miles; a special floating point type. + TYPE_MILES = 11; + + // A length in meters; a special floating point type. + TYPE_METERS = 12; + + // A length in kilometers; a special floating point type. + TYPE_KILOMETERS = 13; +} From b8934c2ca4a543b1bc50c8c8e7838f3495fbd860 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 25 Feb 2021 15:13:28 -0800 Subject: [PATCH 2/3] chore: add build files --- google-analytics-data-bom/pom.xml | 10 ++ google-analytics-data/pom.xml | 9 ++ grpc-google-analytics-data-v1beta/pom.xml | 65 ++++++++++ pom.xml | 12 ++ .../clirr-ignored-differences.xml | 6 - .../clirr-ignored-differences.xml | 19 +++ proto-google-analytics-data-v1beta/pom.xml | 42 +++++++ synth.metadata | 113 +++++++++++++++++- synth.py | 2 +- versions.txt | 4 +- 10 files changed, 269 insertions(+), 13 deletions(-) create mode 100644 grpc-google-analytics-data-v1beta/pom.xml create mode 100644 proto-google-analytics-data-v1beta/clirr-ignored-differences.xml create mode 100644 proto-google-analytics-data-v1beta/pom.xml diff --git a/google-analytics-data-bom/pom.xml b/google-analytics-data-bom/pom.xml index 6c889ed1..3447a3d2 100644 --- a/google-analytics-data-bom/pom.xml +++ b/google-analytics-data-bom/pom.xml @@ -75,11 +75,21 @@ proto-google-analytics-data-v1alpha 0.5.5-SNAPSHOT + + com.google.api.grpc + proto-google-analytics-data-v1beta + 0.5.5-SNAPSHOT + com.google.api.grpc grpc-google-analytics-data-v1alpha 0.5.5-SNAPSHOT + + com.google.api.grpc + grpc-google-analytics-data-v1beta + 0.5.5-SNAPSHOT + diff --git a/google-analytics-data/pom.xml b/google-analytics-data/pom.xml index bad97488..939adc35 100644 --- a/google-analytics-data/pom.xml +++ b/google-analytics-data/pom.xml @@ -46,6 +46,10 @@ com.google.api.grpc proto-google-analytics-data-v1alpha + + com.google.api.grpc + proto-google-analytics-data-v1beta + com.google.guava guava @@ -76,6 +80,11 @@ grpc-google-analytics-data-v1alpha test + + com.google.api.grpc + grpc-google-analytics-data-v1beta + test + com.google.api diff --git a/grpc-google-analytics-data-v1beta/pom.xml b/grpc-google-analytics-data-v1beta/pom.xml new file mode 100644 index 00000000..21f4d3d6 --- /dev/null +++ b/grpc-google-analytics-data-v1beta/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-analytics-data-v1alpha + 0.5.5-SNAPSHOT + grpc-google-analytics-data-v1alpha + GRPC library for grpc-google-analytics-data-v1alpha + + com.google.analytics + google-analytics-data-parent + 0.5.5-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-analytics-data-v1alpha + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1a53a18e..10b1163a 100644 --- a/pom.xml +++ b/pom.xml @@ -77,11 +77,21 @@ proto-google-analytics-data-v1alpha 0.5.5-SNAPSHOT + + com.google.api.grpc + proto-google-analytics-data-v1beta + 0.5.5-SNAPSHOT + com.google.api.grpc grpc-google-analytics-data-v1alpha 0.5.5-SNAPSHOT + + com.google.api.grpc + grpc-google-analytics-data-v1beta + 0.5.5-SNAPSHOT + com.google.cloud @@ -113,7 +123,9 @@ google-analytics-data proto-google-analytics-data-v1alpha + proto-google-analytics-data-v1beta grpc-google-analytics-data-v1alpha + grpc-google-analytics-data-v1beta google-analytics-data-bom diff --git a/proto-google-analytics-data-v1alpha/clirr-ignored-differences.xml b/proto-google-analytics-data-v1alpha/clirr-ignored-differences.xml index d9bbedd6..00405bc0 100644 --- a/proto-google-analytics-data-v1alpha/clirr-ignored-differences.xml +++ b/proto-google-analytics-data-v1alpha/clirr-ignored-differences.xml @@ -16,10 +16,4 @@ com/google/analytics/data/v1alpha/*OrBuilder boolean has*(*) - - - - 8001 - com/google/analytics/data/v1alpha/*UniversalMetadata* - diff --git a/proto-google-analytics-data-v1beta/clirr-ignored-differences.xml b/proto-google-analytics-data-v1beta/clirr-ignored-differences.xml new file mode 100644 index 00000000..2e38d286 --- /dev/null +++ b/proto-google-analytics-data-v1beta/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/analytics/data/v1beta/*OrBuilder + * get*(*) + + + 7012 + com/google/analytics/data/v1beta/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/analytics/data/v1beta/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-analytics-data-v1beta/pom.xml b/proto-google-analytics-data-v1beta/pom.xml new file mode 100644 index 00000000..39d2fef6 --- /dev/null +++ b/proto-google-analytics-data-v1beta/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-analytics-data-v1beta + 0.5.5-SNAPSHOT + proto-google-analytics-data-v1beta + PROTO library for proto-google-analytics-data-v1beta + + com.google.analytics + google-analytics-data-parent + 0.5.5-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.guava + guava + + + com.google.api + api-common + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 8eefdb70..a0548b35 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,23 +3,31 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/java-analytics-data.git", - "sha": "44a96d0276127da97c719c463eb4602ed9ffd483" + "remote": "git@github.com:googleapis/java-analytics-data.git", + "sha": "8712e2e42f418591a8dc410f268a867315ec9741" } }, { "git": { "name": "googleapis-gen", "remote": "https://github.com/googleapis/googleapis-gen.git", - "sha": "9d14cd16d94886f7f10a243e1b5a6876946f32bb", - "internalRef": "358516065" + "sha": "0c7a837ed1c99453da44cea7d8a49c0ccc36beb7", + "internalRef": "359594504" + } + }, + { + "git": { + "name": "googleapis-gen", + "remote": "https://github.com/googleapis/googleapis-gen.git", + "sha": "0c7a837ed1c99453da44cea7d8a49c0ccc36beb7", + "internalRef": "359594504" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" + "sha": "8c5628b86cfa8386de7b8fc1675e6b528b552d57" } } ], @@ -98,10 +106,22 @@ "google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java", "google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataCallableFactory.java", "google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/gapic_metadata.json", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/package-info.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStub.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataCallableFactory.java", + "google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/GrpcBetaAnalyticsDataStub.java", "google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java", "google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsData.java", "google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java", + "google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientTest.java", + "google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsData.java", + "google-analytics-data/src/test/java/com/google/analytics/data/v1beta/MockBetaAnalyticsDataImpl.java", "grpc-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataGrpc.java", + "grpc-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataGrpc.java", "java.header", "license-checks.xml", "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/AnalyticsDataApiProto.java", @@ -189,6 +209,89 @@ "proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java", "proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto", "proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/AnalyticsDataApiProto.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponse.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunPivotReportsResponseOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponse.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/BatchRunReportsResponseOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Cohort.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettings.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortReportSettingsOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpec.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortSpecOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRange.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/CohortsRangeOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRange.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DateRangeOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Dimension.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpression.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionExpressionOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeader.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionHeaderOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadata.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionMetadataOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValue.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/DimensionValueOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Filter.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpression.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionList.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionListOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterExpressionOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/FilterOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/GetMetadataRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metadata.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataName.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetadataOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Metric.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricAggregation.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeader.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricHeaderOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadata.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricMetadataOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricType.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValue.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/MetricValueOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValue.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/NumericValueOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderBy.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/OrderByOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Pivot.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeader.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotDimensionHeaderOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeader.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotHeaderOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PivotOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuota.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/PropertyQuotaOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatus.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/QuotaStatusOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ReportingApiProto.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaData.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/ResponseMetaDataOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/Row.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RowOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponse.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunPivotReportResponseOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponse.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunRealtimeReportResponseOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequest.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportRequestOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponse.java", + "proto-google-analytics-data-v1beta/src/main/java/com/google/analytics/data/v1beta/RunReportResponseOrBuilder.java", + "proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/analytics_data_api.proto", + "proto-google-analytics-data-v1beta/src/main/proto/google/analytics/data/v1beta/data.proto", "renovate.json", "samples/install-without-bom/pom.xml", "samples/pom.xml", diff --git a/synth.py b/synth.py index d7ed92da..4e3b4d42 100644 --- a/synth.py +++ b/synth.py @@ -17,7 +17,7 @@ import synthtool.languages.java as java service = 'analytics-data' -versions = ['v1alpha'] +versions = ['v1alpha', 'v1beta'] for version in versions: java.pregenerated_library( diff --git a/versions.txt b/versions.txt index dc99cd06..efb80edf 100644 --- a/versions.txt +++ b/versions.txt @@ -3,4 +3,6 @@ google-analytics-data:0.5.4:0.5.5-SNAPSHOT proto-google-analytics-data-v1alpha:0.5.4:0.5.5-SNAPSHOT -grpc-google-analytics-data-v1alpha:0.5.4:0.5.5-SNAPSHOT \ No newline at end of file +proto-google-analytics-data-v1beta:0.5.4:0.5.5-SNAPSHOT +grpc-google-analytics-data-v1alpha:0.5.4:0.5.5-SNAPSHOT +grpc-google-analytics-data-v1beta:0.5.4:0.5.5-SNAPSHOT From 66e9c41cd24580ff9a7c422b87fc99408933830f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 25 Feb 2021 15:29:04 -0800 Subject: [PATCH 3/3] chore: fix dependency declaration --- grpc-google-analytics-data-v1beta/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc-google-analytics-data-v1beta/pom.xml b/grpc-google-analytics-data-v1beta/pom.xml index 0ae57a94..5788c0e8 100644 --- a/grpc-google-analytics-data-v1beta/pom.xml +++ b/grpc-google-analytics-data-v1beta/pom.xml @@ -31,7 +31,7 @@ com.google.api.grpc - proto-google-analytics-data-v1alpha + proto-google-analytics-data-v1beta com.google.guava