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: + * + *
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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableSample 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 UnaryCallableFor 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 UnaryCallableSample 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 UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= BetaAnalyticsDataClient =======================
+ *
+ * Service Description: Google Analytics reporting data service.
+ *
+ * Sample for BetaAnalyticsDataClient:
+ *
+ * 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 The default instance has everything set to sensible defaults:
+ *
+ * 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:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcBetaAnalyticsDataCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public 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{@code
+ * try (BetaAnalyticsDataClient betaAnalyticsDataClient = BetaAnalyticsDataClient.create()) {
+ * RunPivotReportRequest request =
+ * RunPivotReportRequest.newBuilder()
+ * .setProperty("property-993141291")
+ * .addAllDimensions(new ArrayList
+ */
+@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.
+ *
+ *
+ *
+ *
+ * {@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