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: * - *
- *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * Metadata response = alphaAnalyticsDataClient.getMetadata(name);
- * }
- *
- *
- *
- * Note: close() needs to be called on the alphaAnalyticsDataClient object to clean up resources + *
Note: close() needs to be called on the AlphaAnalyticsDataClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * @@ -69,30 +61,28 @@ * *
To customize credentials: * - *
- *
+ * {@code
* AlphaAnalyticsDataSettings alphaAnalyticsDataSettings =
* AlphaAnalyticsDataSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* AlphaAnalyticsDataClient alphaAnalyticsDataClient =
* AlphaAnalyticsDataClient.create(alphaAnalyticsDataSettings);
- *
- *
+ * }
*
- * To customize the endpoint:
+ * To customize the endpoint: * - *
- *
+ * {@code
* AlphaAnalyticsDataSettings alphaAnalyticsDataSettings =
* AlphaAnalyticsDataSettings.newBuilder().setEndpoint(myEndpoint).build();
* AlphaAnalyticsDataClient alphaAnalyticsDataClient =
* AlphaAnalyticsDataClient.create(alphaAnalyticsDataSettings);
- *
- *
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class AlphaAnalyticsDataClient implements BackgroundResource { private final AlphaAnalyticsDataSettings settings; private final AlphaAnalyticsDataStub stub; @@ -113,7 +103,7 @@ public static final AlphaAnalyticsDataClient create(AlphaAnalyticsDataSettings s /** * Constructs an instance of AlphaAnalyticsDataClient, using the given stub for making calls. This - * is for advanced usage - prefer to use AlphaAnalyticsDataSettings}. + * is for advanced usage - prefer using create(AlphaAnalyticsDataSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final AlphaAnalyticsDataClient create(AlphaAnalyticsDataStub stub) { @@ -145,7 +135,7 @@ public AlphaAnalyticsDataStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // 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 @@ -153,15 +143,6 @@ public AlphaAnalyticsDataStub getStub() { * 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: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunReportRequest request = RunReportRequest.newBuilder().build();
- * RunReportResponse response = alphaAnalyticsDataClient.runReport(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
*/
@@ -169,7 +150,7 @@ public final RunReportResponse runReport(RunReportRequest request) {
return runReportCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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
@@ -178,36 +159,18 @@ public final RunReportResponse runReport(RunReportRequest request) {
* break down metrics across some common criteria, such as country or event name.
*
* Sample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunReportRequest request = RunReportRequest.newBuilder().build();
- * ApiFuture<RunReportResponse> future = alphaAnalyticsDataClient.runReportCallable().futureCall(request);
- * // Do something
- * RunReportResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunPivotReportRequest request = RunPivotReportRequest.newBuilder().build();
- * RunPivotReportResponse response = alphaAnalyticsDataClient.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
*/
@@ -215,7 +178,7 @@ public final RunPivotReportResponse runPivotReport(RunPivotReportRequest request
return runPivotReportCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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
@@ -223,34 +186,16 @@ public final RunPivotReportResponse runPivotReport(RunPivotReportRequest request
* your data.
*
* Sample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunPivotReportRequest request = RunPivotReportRequest.newBuilder().build();
- * ApiFuture<RunPivotReportResponse> future = alphaAnalyticsDataClient.runPivotReportCallable().futureCall(request);
- * // Do something
- * RunPivotReportResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * BatchRunReportsRequest request = BatchRunReportsRequest.newBuilder().build();
- * BatchRunReportsResponse response = alphaAnalyticsDataClient.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
*/
@@ -258,39 +203,21 @@ public final BatchRunReportsResponse batchRunReports(BatchRunReportsRequest requ
return batchRunReportsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns multiple reports in a batch. All reports must be for the same Entity.
*
* Sample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * BatchRunReportsRequest request = BatchRunReportsRequest.newBuilder().build();
- * ApiFuture<BatchRunReportsResponse> future = alphaAnalyticsDataClient.batchRunReportsCallable().futureCall(request);
- * // Do something
- * BatchRunReportsResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * BatchRunPivotReportsRequest request = BatchRunPivotReportsRequest.newBuilder().build();
- * BatchRunPivotReportsResponse response = alphaAnalyticsDataClient.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
*/
@@ -299,27 +226,18 @@ public final BatchRunPivotReportsResponse batchRunPivotReports(
return batchRunPivotReportsCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns multiple pivot reports in a batch. All reports must be for the same Entity.
*
* Sample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * BatchRunPivotReportsRequest request = BatchRunPivotReportsRequest.newBuilder().build();
- * ApiFuture<BatchRunPivotReportsResponse> future = alphaAnalyticsDataClient.batchRunPivotReportsCallable().futureCall(request);
- * // Do something
- * BatchRunPivotReportsResponse response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * Metadata response = alphaAnalyticsDataClient.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/trusted-testing/analytics-data/property-id).
+ * 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. @@ -354,7 +263,7 @@ public final Metadata getMetadata(MetadataName name) { return getMetadata(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // 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 @@ -365,19 +274,10 @@ public final Metadata getMetadata(MetadataName name) { * 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: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * Metadata response = alphaAnalyticsDataClient.getMetadata(name.toString());
- * }
- *
- *
* @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/trusted-testing/analytics-data/property-id).
+ * 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. @@ -388,7 +288,7 @@ public final Metadata getMetadata(String name) { return getMetadata(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // 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 @@ -399,18 +299,6 @@ public final Metadata getMetadata(String name) { * 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: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * GetMetadataRequest request = GetMetadataRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * Metadata response = alphaAnalyticsDataClient.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
*/
@@ -418,7 +306,7 @@ public final Metadata getMetadata(GetMetadataRequest request) {
return getMetadataCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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
@@ -430,37 +318,16 @@ public final Metadata getMetadata(GetMetadataRequest request) {
* are dimensions and metrics applicable to any property such as `country` and `totalUsers`.
*
* Sample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * GetMetadataRequest request = GetMetadataRequest.newBuilder()
- * .setName(name.toString())
- * .build();
- * ApiFuture<Metadata> future = alphaAnalyticsDataClient.getMetadataCallable().futureCall(request);
- * // Do something
- * Metadata response = future.get();
- * }
- *
*/
public final UnaryCallableSample code: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunRealtimeReportRequest request = RunRealtimeReportRequest.newBuilder().build();
- * RunRealtimeReportResponse response = alphaAnalyticsDataClient.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
*/
@@ -468,21 +335,12 @@ public final RunRealtimeReportResponse runRealtimeReport(RunRealtimeReportReques
return runRealtimeReportCallable().call(request);
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
+ // 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: - * - *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * RunRealtimeReportRequest request = RunRealtimeReportRequest.newBuilder().build();
- * ApiFuture<RunRealtimeReportResponse> future = alphaAnalyticsDataClient.runRealtimeReportCallable().futureCall(request);
- * // Do something
- * RunRealtimeReportResponse response = future.get();
- * }
- *
*/
public final UnaryCallableThe 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 getMetadata to 30 seconds: + *
For example, to set the total timeout of runReport to 30 seconds: * - *
- *
+ * {@code
* AlphaAnalyticsDataSettings.Builder alphaAnalyticsDataSettingsBuilder =
* AlphaAnalyticsDataSettings.newBuilder();
* alphaAnalyticsDataSettingsBuilder
- * .getMetadataSettings()
+ * .runReportSettings()
* .setRetrySettings(
- * alphaAnalyticsDataSettingsBuilder.getMetadataSettings().getRetrySettings().toBuilder()
+ * alphaAnalyticsDataSettingsBuilder
+ * .runReportSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * AlphaAnalyticsDataSettings alphaAnalyticsDataSettings = alphaAnalyticsDataSettingsBuilder.build();
- *
- *
+ * AlphaAnalyticsDataSettings alphaAnalyticsDataSettings =
+ * alphaAnalyticsDataSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
-@BetaApi
+@Generated("by gapic-generator-java")
public class AlphaAnalyticsDataSettings extends ClientSettingsThe interfaces provided are listed below, along with usage samples. - * - *
======================== AlphaAnalyticsDataClient ======================== + *
======================= AlphaAnalyticsDataClient ======================= * *
Service Description: Google Analytics reporting data service. * *
Sample for AlphaAnalyticsDataClient: - * - *
- *
- * try (AlphaAnalyticsDataClient alphaAnalyticsDataClient = AlphaAnalyticsDataClient.create()) {
- * MetadataName name = MetadataName.of("[PROPERTY]");
- * Metadata response = alphaAnalyticsDataClient.getMetadata(name);
- * }
- *
- *
*/
-@Generated("by gapic-generator")
+@Generated("by gapic-generator-java")
package com.google.analytics.data.v1alpha;
import javax.annotation.Generated;
diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java
index 1e548460..39cce2df 100644
--- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java
+++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStub.java
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.google.analytics.data.v1alpha.stub;
import com.google.analytics.data.v1alpha.BatchRunPivotReportsRequest;
@@ -27,19 +28,17 @@
import com.google.analytics.data.v1alpha.RunRealtimeReportResponse;
import com.google.analytics.data.v1alpha.RunReportRequest;
import com.google.analytics.data.v1alpha.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
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Base stub class for Google Analytics Data API.
+ * Base stub class for the AlphaAnalyticsData service API.
*
* This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class AlphaAnalyticsDataStub implements BackgroundResource {
public UnaryCallable 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 getMetadata to 30 seconds:
+ * For example, to set the total timeout of runReport to 30 seconds:
*
- * This class is for advanced usage.
*/
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public class GrpcAlphaAnalyticsDataCallableFactory implements GrpcStubCallableFactory {
+
@Override
public This class is for advanced usage and reflects the underlying API directly.
*/
-@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@Generated("by gapic-generator-java")
public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub {
-
private static final MethodDescriptor
- *
+ * AlphaAnalyticsDataStubSettings alphaAnalyticsDataSettings =
+ * alphaAnalyticsDataSettingsBuilder.build();
+ * }
*/
-@Generated("by gapic-generator")
@BetaApi
+@Generated("by gapic-generator-java")
public class AlphaAnalyticsDataStubSettings extends StubSettings
+ *
- * {@code
* AlphaAnalyticsDataStubSettings.Builder alphaAnalyticsDataSettingsBuilder =
* AlphaAnalyticsDataStubSettings.newBuilder();
* alphaAnalyticsDataSettingsBuilder
- * .getMetadataSettings()
+ * .runReportSettings()
* .setRetrySettings(
- * alphaAnalyticsDataSettingsBuilder.getMetadataSettings().getRetrySettings().toBuilder()
+ * alphaAnalyticsDataSettingsBuilder
+ * .runReportSettings()
+ * .getRetrySettings()
+ * .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
- * AlphaAnalyticsDataStubSettings alphaAnalyticsDataSettings = alphaAnalyticsDataSettingsBuilder.build();
- *