diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 3da3079c..8bf90369 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-data.git", - "sha": "8326c7ef7b6cc111c32b6ab6dfa227f35ddd1b95" + "sha": "bcec049d39402b3184252b0a858ba3af93d6a9a0" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d5fc0bcf9ea9789c5b0e3154a9e3b29e5cea6116" + "sha": "996775eca5fd934edac3c2ae34b80ff0395b1717" } } ] diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index ac689f69..848f0649 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -q -DskipTests=true -NAME=google-analytics-data -VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) +export NAME=google-analytics-data +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs mvn site -B -q @@ -59,7 +59,8 @@ python3 -m docuploader upload . \ popd -# V2 +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" pushd target/devsite/reference diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ada2466..5a71066b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.5.2](https://www.github.com/googleapis/java-analytics-data/compare/v0.5.1...v0.5.2) (2020-12-14) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([4f26986](https://www.github.com/googleapis/java-analytics-data/commit/4f269863aaa3c4b3ed746474784858dce4bb9a74)) + ### [0.5.1](https://www.github.com/googleapis/java-analytics-data/compare/v0.5.0...v0.5.1) (2020-12-02) diff --git a/README.md b/README.md index 1c89bf0c..534a2ecc 100644 --- a/README.md +++ b/README.md @@ -20,17 +20,17 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-data - 0.5.0 + 0.5.1 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.analytics:google-analytics-data:0.5.0' +compile 'com.google.analytics:google-analytics-data:0.5.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.5.0" +libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.5.1" ``` ## Authentication @@ -121,6 +121,8 @@ Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] +Java is a registered trademark of Oracle and/or its affiliates. + [product-docs]: https://developers.google.com/analytics/trusted-testing/analytics-data [javadocs]: https://googleapis.dev/java/google-analytics-data/latest/index.html [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-analytics-data/java7.svg diff --git a/google-analytics-data-bom/pom.xml b/google-analytics-data-bom/pom.xml index 10fbe788..390af16e 100644 --- a/google-analytics-data-bom/pom.xml +++ b/google-analytics-data-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.analytics google-analytics-data-bom - 0.5.1 + 0.5.2 pom com.google.cloud @@ -68,17 +68,17 @@ com.google.analytics google-analytics-data - 0.5.1 + 0.5.2 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 diff --git a/google-analytics-data/pom.xml b/google-analytics-data/pom.xml index f6ed5607..9400ed73 100644 --- a/google-analytics-data/pom.xml +++ b/google-analytics-data/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.analytics google-analytics-data - 0.5.1 + 0.5.2 jar Google Analytics Data https://github.com/googleapis/java-analytics-data @@ -11,7 +11,7 @@ com.google.analytics google-analytics-data-parent - 0.5.1 + 0.5.2 google-analytics-data diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java index ac436a34..a76040ad 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClient.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; import com.google.analytics.data.v1alpha.stub.AlphaAnalyticsDataStub; @@ -24,23 +25,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// 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: * - *

- * 
- * 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 UnaryCallable runReportCallable() { return stub.runReportCallable(); } - // 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 * visible if they are included in a pivot. Multiple pivots can be specified to further dissect * your data. * - *

Sample 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 UnaryCallable runPivotReportCallable() { return stub.runPivotReportCallable(); } - // 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();
-   *   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 UnaryCallable batchRunReportsCallable() { return stub.batchRunReportsCallable(); } - // 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();
-   *   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 UnaryCallable batchRunPivotReportsCallable() { return stub.batchRunPivotReportsCallable(); } - // 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 @@ -330,19 +248,10 @@ public final BatchRunPivotReportsResponse batchRunPivotReports( * 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);
-   * }
-   * 
- * * @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 UnaryCallable getMetadataCallable() { return stub.getMetadataCallable(); } - // 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();
-   *   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 UnaryCallable runRealtimeReportCallable() { diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java index 89357e29..175cf668 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataSettings.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; import com.google.analytics.data.v1alpha.stub.AlphaAnalyticsDataStubSettings; @@ -30,7 +31,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link AlphaAnalyticsDataClient}. * @@ -45,25 +46,27 @@ *

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: * - *

- * 
+ * 
{@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 ClientSettings { + /** Returns the object with the settings used for calls to runReport. */ public UnaryCallSettings runReportSettings() { return ((AlphaAnalyticsDataStubSettings) getStubSettings()).runReportSettings(); @@ -157,18 +160,15 @@ protected AlphaAnalyticsDataSettings(Builder settingsBuilder) throws IOException /** Builder for AlphaAnalyticsDataSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(AlphaAnalyticsDataStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(AlphaAnalyticsDataStubSettings.newBuilder()); - } - protected Builder(AlphaAnalyticsDataSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -177,11 +177,15 @@ protected Builder(AlphaAnalyticsDataStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(AlphaAnalyticsDataStubSettings.newBuilder()); + } + public AlphaAnalyticsDataStubSettings.Builder getStubSettingsBuilder() { return ((AlphaAnalyticsDataStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java index 85aaaea9..e5ee347c 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/package-info.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, @@ -15,26 +15,15 @@ */ /** - * A client to Google Analytics Data API. + * The interfaces provided are listed below, along with usage samples. * - *

The 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 runReportCallable() { diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java index 1aca73b2..c16e06e8 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/AlphaAnalyticsDataStubSettings.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; @@ -51,7 +52,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link AlphaAnalyticsDataStub}. * @@ -66,24 +67,26 @@ *

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: * - *

- * 
+ * 
{@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();
- * 
- * 
+ * AlphaAnalyticsDataStubSettings alphaAnalyticsDataSettings = + * alphaAnalyticsDataSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class AlphaAnalyticsDataStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = @@ -142,10 +145,10 @@ public AlphaAnalyticsDataStub createStub() throws IOException { .getTransportName() .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcAlphaAnalyticsDataStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } /** Returns a builder for the default ExecutorProvider for this service. */ @@ -217,7 +220,6 @@ protected AlphaAnalyticsDataStubSettings(Builder settingsBuilder) throws IOExcep public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder runReportSettings; private final UnaryCallSettings.Builder runPivotReportSettings; @@ -229,19 +231,17 @@ public static class Builder 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( - "retry_policy_1_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNKNOWN))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); 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(); } @@ -252,45 +252,38 @@ public static class Builder RetrySettings settings = null; 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_1_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); + 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("no_retry_1_params", settings); + definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } protected Builder() { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(clientContext); runReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - runPivotReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchRunReportsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchRunPivotReportsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getMetadataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - runRealtimeReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = @@ -301,21 +294,41 @@ protected Builder(ClientContext clientContext) { batchRunPivotReportsSettings, getMetadataSettings, runRealtimeReportSettings); - initDefaults(this); } + protected Builder(AlphaAnalyticsDataStubSettings 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 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")) @@ -338,38 +351,18 @@ private static Builder initDefaults(Builder builder) { builder .getMetadataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + .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("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); return builder; } - protected Builder(AlphaAnalyticsDataStubSettings 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); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataCallableFactory.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataCallableFactory.java index 56600f75..b3914fa3 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataCallableFactory.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataCallableFactory.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,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.data.v1alpha.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; @@ -31,18 +31,19 @@ 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 +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Google Analytics Data API. + * gRPC callable factory implementation for the AlphaAnalyticsData service API. * *

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 UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java index 581e99c0..71fe7cad 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/GrpcAlphaAnalyticsDataStub.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,7 +28,6 @@ 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.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -36,6 +36,7 @@ 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; @@ -43,16 +44,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Google Analytics Data API. + * gRPC stub implementation 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") +@Generated("by gapic-generator-java") public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { - private static final MethodDescriptor runReportMethodDescriptor = MethodDescriptor.newBuilder() @@ -61,6 +60,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setRequestMarshaller(ProtoUtils.marshaller(RunReportRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RunReportResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor runPivotReportMethodDescriptor = MethodDescriptor.newBuilder() @@ -71,6 +71,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setResponseMarshaller( ProtoUtils.marshaller(RunPivotReportResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor batchRunReportsMethodDescriptor = MethodDescriptor.newBuilder() @@ -81,6 +82,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setResponseMarshaller( ProtoUtils.marshaller(BatchRunReportsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor batchRunPivotReportsMethodDescriptor = MethodDescriptor.newBuilder() @@ -92,6 +94,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setResponseMarshaller( ProtoUtils.marshaller(BatchRunPivotReportsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getMetadataMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -99,6 +102,7 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { .setRequestMarshaller(ProtoUtils.marshaller(GetMetadataRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Metadata.getDefaultInstance())) .build(); + private static final MethodDescriptor runRealtimeReportMethodDescriptor = MethodDescriptor.newBuilder() @@ -111,8 +115,6 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { ProtoUtils.marshaller(RunRealtimeReportResponse.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final UnaryCallable runReportCallable; private final UnaryCallable runPivotReportCallable; private final UnaryCallable @@ -123,6 +125,8 @@ public class GrpcAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { private final UnaryCallable runRealtimeReportCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcAlphaAnalyticsDataStub create(AlphaAnalyticsDataStubSettings settings) @@ -163,6 +167,7 @@ protected GrpcAlphaAnalyticsDataStub( GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings runReportTransportSettings = GrpcCallSettings.newBuilder() @@ -234,7 +239,12 @@ public Map extract(RunRealtimeReportRequest request) { settings.runRealtimeReportSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; } public UnaryCallable runReportCallable() { diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java index 88695283..8322a39b 100644 --- a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.java +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientTest.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; import com.google.api.gax.core.NoCredentialsProvider; @@ -23,12 +24,13 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.protobuf.AbstractMessage; -import io.grpc.Status; 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; @@ -36,31 +38,31 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class AlphaAnalyticsDataClientTest { - private static MockAlphaAnalyticsData mockAlphaAnalyticsData; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private AlphaAnalyticsDataClient client; + private static MockAlphaAnalyticsData mockAlphaAnalyticsData; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { mockAlphaAnalyticsData = new MockAlphaAnalyticsData(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( UUID.randomUUID().toString(), Arrays.asList(mockAlphaAnalyticsData)); - serviceHelper.start(); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); AlphaAnalyticsDataSettings settings = AlphaAnalyticsDataSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -75,22 +77,61 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void runReportTest() { - int rowCount = 1340416618; + public void runReportTest() throws Exception { RunReportResponse expectedResponse = - RunReportResponse.newBuilder().setRowCount(rowCount).build(); + RunReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllTotals(new ArrayList()) + .addAllMaximums(new ArrayList()) + .addAllMinimums(new ArrayList()) + .setRowCount(1340416618) + .setMetadata(ResponseMetaData.newBuilder().build()) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); - RunReportRequest request = RunReportRequest.newBuilder().build(); + RunReportRequest request = + RunReportRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setOffset(-1019779949) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .addAllOrderBys(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); RunReportResponse actualResponse = client.runReport(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RunReportRequest actualRequest = (RunReportRequest) actualRequests.get(0); - + RunReportRequest actualRequest = ((RunReportRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); + Assert.assertEquals(request.getDimensionsList(), actualRequest.getDimensionsList()); + Assert.assertEquals(request.getMetricsList(), actualRequest.getMetricsList()); + Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); + Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); + Assert.assertEquals(request.getLimit(), actualRequest.getLimit()); + Assert.assertEquals( + request.getMetricAggregationsList(), actualRequest.getMetricAggregationsList()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + 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(), @@ -98,36 +139,82 @@ public void runReportTest() { } @Test - @SuppressWarnings("all") public void runReportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.addException(exception); try { - RunReportRequest request = RunReportRequest.newBuilder().build(); - + RunReportRequest request = + RunReportRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setOffset(-1019779949) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .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 + // Expected exception. } } @Test - @SuppressWarnings("all") - public void runPivotReportTest() { - RunPivotReportResponse expectedResponse = RunPivotReportResponse.newBuilder().build(); + 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(); mockAlphaAnalyticsData.addResponse(expectedResponse); - RunPivotReportRequest request = RunPivotReportRequest.newBuilder().build(); + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .addAllPivots(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); RunPivotReportResponse actualResponse = client.runPivotReport(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RunPivotReportRequest actualRequest = (RunPivotReportRequest) actualRequests.get(0); - + RunPivotReportRequest actualRequest = ((RunPivotReportRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); + 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.getPivotsList(), actualRequest.getPivotsList()); + Assert.assertEquals(request.getDateRangesList(), actualRequest.getDateRangesList()); + 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(), @@ -135,36 +222,55 @@ public void runPivotReportTest() { } @Test - @SuppressWarnings("all") public void runPivotReportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.addException(exception); try { - RunPivotReportRequest request = RunPivotReportRequest.newBuilder().build(); - + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .addAllPivots(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); client.runPivotReport(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchRunReportsTest() { - BatchRunReportsResponse expectedResponse = BatchRunReportsResponse.newBuilder().build(); + public void batchRunReportsTest() throws Exception { + BatchRunReportsResponse expectedResponse = + BatchRunReportsResponse.newBuilder() + .addAllReports(new ArrayList()) + .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); - BatchRunReportsRequest request = BatchRunReportsRequest.newBuilder().build(); + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllRequests(new ArrayList()) + .build(); BatchRunReportsResponse actualResponse = client.batchRunReports(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchRunReportsRequest actualRequest = (BatchRunReportsRequest) actualRequests.get(0); + BatchRunReportsRequest actualRequest = ((BatchRunReportsRequest) actualRequests.get(0)); + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -172,37 +278,47 @@ public void batchRunReportsTest() { } @Test - @SuppressWarnings("all") public void batchRunReportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.addException(exception); try { - BatchRunReportsRequest request = BatchRunReportsRequest.newBuilder().build(); - + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllRequests(new ArrayList()) + .build(); client.batchRunReports(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchRunPivotReportsTest() { + public void batchRunPivotReportsTest() throws Exception { BatchRunPivotReportsResponse expectedResponse = - BatchRunPivotReportsResponse.newBuilder().build(); + BatchRunPivotReportsResponse.newBuilder() + .addAllPivotReports(new ArrayList()) + .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); - BatchRunPivotReportsRequest request = BatchRunPivotReportsRequest.newBuilder().build(); + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllRequests(new ArrayList()) + .build(); BatchRunPivotReportsResponse actualResponse = client.batchRunPivotReports(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchRunPivotReportsRequest actualRequest = (BatchRunPivotReportsRequest) actualRequests.get(0); + BatchRunPivotReportsRequest actualRequest = + ((BatchRunPivotReportsRequest) actualRequests.get(0)); + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -210,26 +326,31 @@ public void batchRunPivotReportsTest() { } @Test - @SuppressWarnings("all") public void batchRunPivotReportsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.addException(exception); try { - BatchRunPivotReportsRequest request = BatchRunPivotReportsRequest.newBuilder().build(); - + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setEntity(Entity.newBuilder().build()) + .addAllRequests(new ArrayList()) + .build(); client.batchRunPivotReports(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getMetadataTest() { - MetadataName name2 = MetadataName.of("[PROPERTY]"); - Metadata expectedResponse = Metadata.newBuilder().setName(name2.toString()).build(); + public void getMetadataTest() throws Exception { + Metadata expectedResponse = + Metadata.newBuilder() + .setName(MetadataName.of("[PROPERTY]").toString()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); MetadataName name = MetadataName.of("[PROPERTY]"); @@ -239,9 +360,9 @@ public void getMetadataTest() { List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetMetadataRequest actualRequest = (GetMetadataRequest) actualRequests.get(0); + GetMetadataRequest actualRequest = ((GetMetadataRequest) actualRequests.get(0)); - Assert.assertEquals(name, MetadataName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -249,38 +370,104 @@ public void getMetadataTest() { } @Test - @SuppressWarnings("all") public void getMetadataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.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(); + mockAlphaAnalyticsData.addResponse(expectedResponse); + + String name = "name3373707"; + + Metadata actualResponse = client.getMetadata(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAlphaAnalyticsData.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); + mockAlphaAnalyticsData.addException(exception); + try { + String name = "name3373707"; client.getMetadata(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void runRealtimeReportTest() { - int rowCount = 1340416618; + public void runRealtimeReportTest() throws Exception { RunRealtimeReportResponse expectedResponse = - RunRealtimeReportResponse.newBuilder().setRowCount(rowCount).build(); + RunRealtimeReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllTotals(new ArrayList()) + .addAllMaximums(new ArrayList()) + .addAllMinimums(new ArrayList()) + .setRowCount(1340416618) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .build(); mockAlphaAnalyticsData.addResponse(expectedResponse); - RunRealtimeReportRequest request = RunRealtimeReportRequest.newBuilder().build(); + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setLimit(102976443) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .build(); RunRealtimeReportResponse actualResponse = client.runRealtimeReport(request); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAlphaAnalyticsData.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RunRealtimeReportRequest actualRequest = (RunRealtimeReportRequest) actualRequests.get(0); - + 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.getLimit(), actualRequest.getLimit()); + Assert.assertEquals(request.getDimensionFilter(), actualRequest.getDimensionFilter()); + Assert.assertEquals(request.getMetricFilter(), actualRequest.getMetricFilter()); + Assert.assertEquals( + request.getMetricAggregationsList(), actualRequest.getMetricAggregationsList()); + Assert.assertEquals(request.getOrderBysList(), actualRequest.getOrderBysList()); + Assert.assertEquals(request.getReturnPropertyQuota(), actualRequest.getReturnPropertyQuota()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -288,18 +475,27 @@ public void runRealtimeReportTest() { } @Test - @SuppressWarnings("all") public void runRealtimeReportExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAlphaAnalyticsData.addException(exception); try { - RunRealtimeReportRequest request = RunRealtimeReportRequest.newBuilder().build(); - + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("property-993141291") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setLimit(102976443) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .build(); client.runRealtimeReport(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsData.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsData.java index 45d7b63a..de683298 100644 --- a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsData.java +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsData.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; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockAlphaAnalyticsData implements MockGrpcService { private final MockAlphaAnalyticsDataImpl serviceImpl; diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java index 737af436..7f01e008 100644 --- a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.java +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/MockAlphaAnalyticsDataImpl.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; import com.google.analytics.data.v1alpha.AlphaAnalyticsDataGrpc.AlphaAnalyticsDataImplBase; @@ -23,9 +24,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockAlphaAnalyticsDataImpl extends AlphaAnalyticsDataImplBase { private List requests; private Queue responses; @@ -62,10 +64,10 @@ public void runReport( Object response = responses.remove(); if (response instanceof RunReportResponse) { requests.add(request); - responseObserver.onNext((RunReportResponse) response); + responseObserver.onNext(((RunReportResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -77,10 +79,10 @@ public void runPivotReport( Object response = responses.remove(); if (response instanceof RunPivotReportResponse) { requests.add(request); - responseObserver.onNext((RunPivotReportResponse) response); + responseObserver.onNext(((RunPivotReportResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -92,10 +94,10 @@ public void batchRunReports( Object response = responses.remove(); if (response instanceof BatchRunReportsResponse) { requests.add(request); - responseObserver.onNext((BatchRunReportsResponse) response); + responseObserver.onNext(((BatchRunReportsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -108,10 +110,10 @@ public void batchRunPivotReports( Object response = responses.remove(); if (response instanceof BatchRunPivotReportsResponse) { requests.add(request); - responseObserver.onNext((BatchRunPivotReportsResponse) response); + responseObserver.onNext(((BatchRunPivotReportsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -122,10 +124,10 @@ public void getMetadata(GetMetadataRequest request, StreamObserver res Object response = responses.remove(); if (response instanceof Metadata) { requests.add(request); - responseObserver.onNext((Metadata) response); + responseObserver.onNext(((Metadata) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -138,10 +140,10 @@ public void runRealtimeReport( Object response = responses.remove(); if (response instanceof RunRealtimeReportResponse) { requests.add(request); - responseObserver.onNext((RunRealtimeReportResponse) response); + responseObserver.onNext(((RunRealtimeReportResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/grpc-google-analytics-data-v1alpha/pom.xml b/grpc-google-analytics-data-v1alpha/pom.xml index 44128f30..817c781b 100644 --- a/grpc-google-analytics-data-v1alpha/pom.xml +++ b/grpc-google-analytics-data-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 grpc-google-analytics-data-v1alpha GRPC library for grpc-google-analytics-data-v1alpha com.google.analytics google-analytics-data-parent - 0.5.1 + 0.5.2 diff --git a/pom.xml b/pom.xml index 4ed64e6b..146865a0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-data-parent pom - 0.5.1 + 0.5.2 Google Analytics Data Parent https://github.com/googleapis/java-analytics-data @@ -70,23 +70,23 @@ com.google.analytics google-analytics-data - 0.5.1 + 0.5.2 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 com.google.cloud google-cloud-shared-dependencies - 0.16.0 + 0.16.1 pom import diff --git a/proto-google-analytics-data-v1alpha/pom.xml b/proto-google-analytics-data-v1alpha/pom.xml index 76d6470a..d708ccde 100644 --- a/proto-google-analytics-data-v1alpha/pom.xml +++ b/proto-google-analytics-data-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.5.1 + 0.5.2 proto-google-analytics-data-v1alpha PROTO library for proto-google-analytics-data-v1alpha com.google.analytics google-analytics-data-parent - 0.5.1 + 0.5.2 diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Cohort.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Cohort.java index 6d281ab5..57b27504 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Cohort.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Cohort.java @@ -22,8 +22,8 @@ * * *
- * Defines a cohort. A cohort is a group of users who share a common
- * characteristic. For example, all users with the same acquisition date
+ * Defines a cohort selection criteria. A cohort is a group of users who share
+ * a common characteristic. For example, users with the same `firstTouchDate`
  * belong to the same cohort.
  * 
* @@ -198,8 +198,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The dimension used by cohort. Only supports `firstTouchDate` for retention
-   * report.
+   * Dimension used by the cohort. Required and only supports `firstTouchDate`.
    * 
* * string dimension = 2; @@ -222,8 +221,7 @@ public java.lang.String getDimension() { * * *
-   * The dimension used by cohort. Only supports `firstTouchDate` for retention
-   * report.
+   * Dimension used by the cohort. Required and only supports `firstTouchDate`.
    * 
* * string dimension = 2; @@ -249,16 +247,20 @@ public com.google.protobuf.ByteString getDimensionBytes() { * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; @@ -273,16 +275,20 @@ public boolean hasDateRange() { * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; @@ -299,16 +305,20 @@ public com.google.analytics.data.v1alpha.DateRange getDateRange() { * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; @@ -503,8 +513,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Defines a cohort. A cohort is a group of users who share a common
-   * characteristic. For example, all users with the same acquisition date
+   * Defines a cohort selection criteria. A cohort is a group of users who share
+   * a common characteristic. For example, users with the same `firstTouchDate`
    * belong to the same cohort.
    * 
* @@ -805,8 +815,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The dimension used by cohort. Only supports `firstTouchDate` for retention
-     * report.
+     * Dimension used by the cohort. Required and only supports `firstTouchDate`.
      * 
* * string dimension = 2; @@ -828,8 +837,7 @@ public java.lang.String getDimension() { * * *
-     * The dimension used by cohort. Only supports `firstTouchDate` for retention
-     * report.
+     * Dimension used by the cohort. Required and only supports `firstTouchDate`.
      * 
* * string dimension = 2; @@ -851,8 +859,7 @@ public com.google.protobuf.ByteString getDimensionBytes() { * * *
-     * The dimension used by cohort. Only supports `firstTouchDate` for retention
-     * report.
+     * Dimension used by the cohort. Required and only supports `firstTouchDate`.
      * 
* * string dimension = 2; @@ -873,8 +880,7 @@ public Builder setDimension(java.lang.String value) { * * *
-     * The dimension used by cohort. Only supports `firstTouchDate` for retention
-     * report.
+     * Dimension used by the cohort. Required and only supports `firstTouchDate`.
      * 
* * string dimension = 2; @@ -891,8 +897,7 @@ public Builder clearDimension() { * * *
-     * The dimension used by cohort. Only supports `firstTouchDate` for retention
-     * report.
+     * Dimension used by the cohort. Required and only supports `firstTouchDate`.
      * 
* * string dimension = 2; @@ -921,16 +926,20 @@ public Builder setDimensionBytes(com.google.protobuf.ByteString value) { * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -944,16 +953,20 @@ public boolean hasDateRange() { * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -973,16 +986,20 @@ public com.google.analytics.data.v1alpha.DateRange getDateRange() { * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1004,16 +1021,20 @@ public Builder setDateRange(com.google.analytics.data.v1alpha.DateRange value) { * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1033,16 +1054,20 @@ public Builder setDateRange( * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1068,16 +1093,20 @@ public Builder mergeDateRange(com.google.analytics.data.v1alpha.DateRange value) * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1097,16 +1126,20 @@ public Builder clearDateRange() { * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1120,16 +1153,20 @@ public com.google.analytics.data.v1alpha.DateRange.Builder getDateRangeBuilder() * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; @@ -1147,16 +1184,20 @@ public com.google.analytics.data.v1alpha.DateRangeOrBuilder getDateRangeOrBuilde * * *
-     * The cohort selects users whose first visit date is between start date
-     * and end date defined in the `dateRange`. In a cohort request, this
-     * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-     * `RunPivotReportRequest` must be unspecified.
-     * The date range should be aligned with the cohort's granularity. If
-     * CohortsRange uses daily granularity, the date range can be aligned to any
-     * day. If CohortsRange uses weekly granularity, the date range should be
-     * aligned to the week boundary, starting at Sunday and ending Saturday. If
-     * CohortsRange uses monthly granularity, the date range should be aligned to
-     * the month, starting at the first and ending on the last day of the month.
+     * 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.v1alpha.DateRange date_range = 3; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortOrBuilder.java index 60d947c9..611b0108 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortOrBuilder.java @@ -58,8 +58,7 @@ public interface CohortOrBuilder * * *
-   * The dimension used by cohort. Only supports `firstTouchDate` for retention
-   * report.
+   * Dimension used by the cohort. Required and only supports `firstTouchDate`.
    * 
* * string dimension = 2; @@ -71,8 +70,7 @@ public interface CohortOrBuilder * * *
-   * The dimension used by cohort. Only supports `firstTouchDate` for retention
-   * report.
+   * Dimension used by the cohort. Required and only supports `firstTouchDate`.
    * 
* * string dimension = 2; @@ -85,16 +83,20 @@ public interface CohortOrBuilder * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; @@ -106,16 +108,20 @@ public interface CohortOrBuilder * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; @@ -127,16 +133,20 @@ public interface CohortOrBuilder * * *
-   * The cohort selects users whose first visit date is between start date
-   * and end date defined in the `dateRange`. In a cohort request, this
-   * `dateRange` is required and the `dateRanges` in the `RunReportRequest` or
-   * `RunPivotReportRequest` must be unspecified.
-   * The date range should be aligned with the cohort's granularity. If
-   * CohortsRange uses daily granularity, the date range can be aligned to any
-   * day. If CohortsRange uses weekly granularity, the date range should be
-   * aligned to the week boundary, starting at Sunday and ending Saturday. If
-   * CohortsRange uses monthly granularity, the date range should be aligned to
-   * the month, starting at the first and ending on the last day of the month.
+   * 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.v1alpha.DateRange date_range = 3; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettings.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettings.java index c952de95..0b069a74 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettings.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettings.java @@ -22,7 +22,7 @@ * * *
- * Settings of a cohort report.
+ * Optional settings of a cohort report.
  * 
* * Protobuf type {@code google.analytics.data.v1alpha.CohortReportSettings} @@ -113,7 +113,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * If true, accumulates the result from first visit day to the end day. Not
+   * If true, accumulates the result from first touch day to the end day. Not
    * supported in `RunReportRequest`.
    * 
* @@ -290,7 +290,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Settings of a cohort report.
+   * Optional settings of a cohort report.
    * 
* * Protobuf type {@code google.analytics.data.v1alpha.CohortReportSettings} @@ -449,7 +449,7 @@ public Builder mergeFrom( * * *
-     * If true, accumulates the result from first visit day to the end day. Not
+     * If true, accumulates the result from first touch day to the end day. Not
      * supported in `RunReportRequest`.
      * 
* @@ -465,7 +465,7 @@ public boolean getAccumulate() { * * *
-     * If true, accumulates the result from first visit day to the end day. Not
+     * If true, accumulates the result from first touch day to the end day. Not
      * supported in `RunReportRequest`.
      * 
* @@ -484,7 +484,7 @@ public Builder setAccumulate(boolean value) { * * *
-     * If true, accumulates the result from first visit day to the end day. Not
+     * If true, accumulates the result from first touch day to the end day. Not
      * supported in `RunReportRequest`.
      * 
* diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettingsOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettingsOrBuilder.java index de6b6ec8..62fec71a 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettingsOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortReportSettingsOrBuilder.java @@ -27,7 +27,7 @@ public interface CohortReportSettingsOrBuilder * * *
-   * If true, accumulates the result from first visit day to the end day. Not
+   * If true, accumulates the result from first touch day to the end day. Not
    * supported in `RunReportRequest`.
    * 
* diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpec.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpec.java index 09d154e8..61ab08a1 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpec.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpec.java @@ -22,7 +22,17 @@ * * *
- * Specification for a cohort report.
+ * Specification of cohorts for a cohort report.
+ * Cohort reports can be used for example to 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.
+ * 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.v1alpha.CohortSpec} @@ -158,7 +168,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -171,7 +183,9 @@ public java.util.List getCohortsList() * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -185,7 +199,9 @@ public java.util.List getCohortsList() * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -198,7 +214,9 @@ public int getCohortsCount() { * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -211,7 +229,9 @@ public com.google.analytics.data.v1alpha.Cohort getCohorts(int index) { * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -227,7 +247,8 @@ public com.google.analytics.data.v1alpha.CohortOrBuilder getCohortsOrBuilder(int * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -242,7 +263,8 @@ public boolean hasCohortsRange() { * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -259,7 +281,8 @@ public com.google.analytics.data.v1alpha.CohortsRange getCohortsRange() { * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -275,7 +298,7 @@ public com.google.analytics.data.v1alpha.CohortsRangeOrBuilder getCohortsRangeOr * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -290,7 +313,7 @@ public boolean hasCohortReportSettings() { * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -307,7 +330,7 @@ public com.google.analytics.data.v1alpha.CohortReportSettings getCohortReportSet * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -512,7 +535,17 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Specification for a cohort report.
+   * Specification of cohorts for a cohort report.
+   * Cohort reports can be used for example to 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.
+   * 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.v1alpha.CohortSpec} @@ -753,7 +786,9 @@ private void ensureCohortsIsMutable() { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -769,7 +804,9 @@ public java.util.List getCohortsList() * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -785,7 +822,9 @@ public int getCohortsCount() { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -801,7 +840,9 @@ public com.google.analytics.data.v1alpha.Cohort getCohorts(int index) { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -823,7 +864,9 @@ public Builder setCohorts(int index, com.google.analytics.data.v1alpha.Cohort va * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -843,7 +886,9 @@ public Builder setCohorts( * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -865,7 +910,9 @@ public Builder addCohorts(com.google.analytics.data.v1alpha.Cohort value) { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -887,7 +934,9 @@ public Builder addCohorts(int index, com.google.analytics.data.v1alpha.Cohort va * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -906,7 +955,9 @@ public Builder addCohorts(com.google.analytics.data.v1alpha.Cohort.Builder build * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -926,7 +977,9 @@ public Builder addCohorts( * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -946,7 +999,9 @@ public Builder addAllCohorts( * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -965,7 +1020,9 @@ public Builder clearCohorts() { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -984,7 +1041,9 @@ public Builder removeCohorts(int index) { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -996,7 +1055,9 @@ public com.google.analytics.data.v1alpha.Cohort.Builder getCohortsBuilder(int in * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -1012,7 +1073,9 @@ public com.google.analytics.data.v1alpha.CohortOrBuilder getCohortsOrBuilder(int * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -1029,7 +1092,9 @@ public com.google.analytics.data.v1alpha.CohortOrBuilder getCohortsOrBuilder(int * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -1042,7 +1107,9 @@ public com.google.analytics.data.v1alpha.Cohort.Builder addCohortsBuilder() { * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -1055,7 +1122,9 @@ public com.google.analytics.data.v1alpha.Cohort.Builder addCohortsBuilder(int in * * *
-     * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -1092,7 +1161,8 @@ public com.google.analytics.data.v1alpha.Cohort.Builder addCohortsBuilder(int in * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1106,7 +1176,8 @@ public boolean hasCohortsRange() { * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1126,7 +1197,8 @@ public com.google.analytics.data.v1alpha.CohortsRange getCohortsRange() { * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1148,7 +1220,8 @@ public Builder setCohortsRange(com.google.analytics.data.v1alpha.CohortsRange va * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1168,7 +1241,8 @@ public Builder setCohortsRange( * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1194,7 +1268,8 @@ public Builder mergeCohortsRange(com.google.analytics.data.v1alpha.CohortsRange * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1214,7 +1289,8 @@ public Builder clearCohortsRange() { * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1228,7 +1304,8 @@ public com.google.analytics.data.v1alpha.CohortsRange.Builder getCohortsRangeBui * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1246,7 +1323,8 @@ public com.google.analytics.data.v1alpha.CohortsRangeOrBuilder getCohortsRangeOr * * *
-     * The data ranges of cohorts.
+     * Cohort reports follow cohorts over an extended reporting date range. This
+     * range specifies an offset duration to follow the cohorts over.
      * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -1278,7 +1356,7 @@ public com.google.analytics.data.v1alpha.CohortsRangeOrBuilder getCohortsRangeOr * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1292,7 +1370,7 @@ public boolean hasCohortReportSettings() { * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1312,7 +1390,7 @@ public com.google.analytics.data.v1alpha.CohortReportSettings getCohortReportSet * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1335,7 +1413,7 @@ public Builder setCohortReportSettings( * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1355,7 +1433,7 @@ public Builder setCohortReportSettings( * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1383,7 +1461,7 @@ public Builder mergeCohortReportSettings( * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1403,7 +1481,7 @@ public Builder clearCohortReportSettings() { * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1418,7 +1496,7 @@ public Builder clearCohortReportSettings() { * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -1437,7 +1515,7 @@ public Builder clearCohortReportSettings() { * * *
-     * Settings of a cohort report.
+     * Optional settings for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpecOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpecOrBuilder.java index a4f7e6d4..7742bd5b 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpecOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortSpecOrBuilder.java @@ -27,7 +27,9 @@ public interface CohortSpecOrBuilder * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -37,7 +39,9 @@ public interface CohortSpecOrBuilder * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -47,7 +51,9 @@ public interface CohortSpecOrBuilder * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -57,7 +63,9 @@ public interface CohortSpecOrBuilder * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -68,7 +76,9 @@ public interface CohortSpecOrBuilder * * *
-   * The definition for the 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.v1alpha.Cohort cohorts = 1; @@ -79,7 +89,8 @@ public interface CohortSpecOrBuilder * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -91,7 +102,8 @@ public interface CohortSpecOrBuilder * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -103,7 +115,8 @@ public interface CohortSpecOrBuilder * * *
-   * The data ranges of cohorts.
+   * Cohort reports follow cohorts over an extended reporting date range. This
+   * range specifies an offset duration to follow the cohorts over.
    * 
* * .google.analytics.data.v1alpha.CohortsRange cohorts_range = 2; @@ -114,7 +127,7 @@ public interface CohortSpecOrBuilder * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -126,7 +139,7 @@ public interface CohortSpecOrBuilder * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; @@ -138,7 +151,7 @@ public interface CohortSpecOrBuilder * * *
-   * Settings of a cohort report.
+   * Optional settings for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortReportSettings cohort_report_settings = 3; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRange.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRange.java index beff9fd0..3aed2bb0 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRange.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRange.java @@ -22,7 +22,8 @@ * * *
- * Describes date range for a cohort report.
+ * 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.v1alpha.CohortsRange} @@ -125,7 +126,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Reporting granularity for the cohorts.
+   * 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.v1alpha.CohortsRange.Granularity} @@ -135,7 +137,7 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Unspecified.
+     * Should never be specified.
      * 
* * GRANULARITY_UNSPECIFIED = 0; @@ -145,7 +147,8 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Daily
+     * Daily granularity. Commonly used if the cohort's `dateRange` is a single
+     * day and the request contains `cohortNthDay`.
      * 
* * DAILY = 1; @@ -155,7 +158,9 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Weekly
+     * 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; @@ -165,7 +170,8 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Monthly
+     * Monthly granularity. Commonly used if the cohort's `dateRange` is a month
+     * in duration and the request contains `cohortNthMonth`.
      * 
* * MONTHLY = 3; @@ -178,7 +184,7 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Unspecified.
+     * Should never be specified.
      * 
* * GRANULARITY_UNSPECIFIED = 0; @@ -188,7 +194,8 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Daily
+     * Daily granularity. Commonly used if the cohort's `dateRange` is a single
+     * day and the request contains `cohortNthDay`.
      * 
* * DAILY = 1; @@ -198,7 +205,9 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Weekly
+     * 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; @@ -208,7 +217,8 @@ public enum Granularity implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Monthly
+     * Monthly granularity. Commonly used if the cohort's `dateRange` is a month
+     * in duration and the request contains `cohortNthMonth`.
      * 
* * MONTHLY = 3; @@ -306,8 +316,8 @@ private Granularity(int value) { * * *
-   * Reporting date range for each cohort is calculated based on these three
-   * fields.
+   * The granularity used to interpret the `startOffset` and `endOffset` for the
+   * extended reporting date range for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -322,8 +332,8 @@ public int getGranularityValue() { * * *
-   * Reporting date range for each cohort is calculated based on these three
-   * fields.
+   * The granularity used to interpret the `startOffset` and `endOffset` for the
+   * extended reporting date range for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -346,8 +356,15 @@ public com.google.analytics.data.v1alpha.CohortsRange.Granularity getGranularity * * *
-   * For daily cohorts, this will be the start day offset.
-   * For weekly cohorts, this will be the week offset.
+   * `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; @@ -365,8 +382,16 @@ public int getStartOffset() { * * *
-   * For daily cohorts, this will be the end day offset.
-   * For weekly cohorts, this will be the week offset.
+   * `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; @@ -563,7 +588,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Describes date range for a cohort report.
+   * 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.v1alpha.CohortsRange} @@ -732,8 +758,8 @@ public Builder mergeFrom( * * *
-     * Reporting date range for each cohort is calculated based on these three
-     * fields.
+     * The granularity used to interpret the `startOffset` and `endOffset` for the
+     * extended reporting date range for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -748,8 +774,8 @@ public int getGranularityValue() { * * *
-     * Reporting date range for each cohort is calculated based on these three
-     * fields.
+     * The granularity used to interpret the `startOffset` and `endOffset` for the
+     * extended reporting date range for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -767,8 +793,8 @@ public Builder setGranularityValue(int value) { * * *
-     * Reporting date range for each cohort is calculated based on these three
-     * fields.
+     * The granularity used to interpret the `startOffset` and `endOffset` for the
+     * extended reporting date range for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -788,8 +814,8 @@ public com.google.analytics.data.v1alpha.CohortsRange.Granularity getGranularity * * *
-     * Reporting date range for each cohort is calculated based on these three
-     * fields.
+     * The granularity used to interpret the `startOffset` and `endOffset` for the
+     * extended reporting date range for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -811,8 +837,8 @@ public Builder setGranularity( * * *
-     * Reporting date range for each cohort is calculated based on these three
-     * fields.
+     * The granularity used to interpret the `startOffset` and `endOffset` for the
+     * extended reporting date range for a cohort report.
      * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -831,8 +857,15 @@ public Builder clearGranularity() { * * *
-     * For daily cohorts, this will be the start day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; @@ -847,8 +880,15 @@ public int getStartOffset() { * * *
-     * For daily cohorts, this will be the start day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; @@ -866,8 +906,15 @@ public Builder setStartOffset(int value) { * * *
-     * For daily cohorts, this will be the start day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; @@ -886,8 +933,16 @@ public Builder clearStartOffset() { * * *
-     * For daily cohorts, this will be the end day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; @@ -902,8 +957,16 @@ public int getEndOffset() { * * *
-     * For daily cohorts, this will be the end day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; @@ -921,8 +984,16 @@ public Builder setEndOffset(int value) { * * *
-     * For daily cohorts, this will be the end day offset.
-     * For weekly cohorts, this will be the week offset.
+     * `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; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRangeOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRangeOrBuilder.java index faa53c7b..30282710 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRangeOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/CohortsRangeOrBuilder.java @@ -27,8 +27,8 @@ public interface CohortsRangeOrBuilder * * *
-   * Reporting date range for each cohort is calculated based on these three
-   * fields.
+   * The granularity used to interpret the `startOffset` and `endOffset` for the
+   * extended reporting date range for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -40,8 +40,8 @@ public interface CohortsRangeOrBuilder * * *
-   * Reporting date range for each cohort is calculated based on these three
-   * fields.
+   * The granularity used to interpret the `startOffset` and `endOffset` for the
+   * extended reporting date range for a cohort report.
    * 
* * .google.analytics.data.v1alpha.CohortsRange.Granularity granularity = 1; @@ -54,8 +54,15 @@ public interface CohortsRangeOrBuilder * * *
-   * For daily cohorts, this will be the start day offset.
-   * For weekly cohorts, this will be the week offset.
+   * `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; @@ -68,8 +75,16 @@ public interface CohortsRangeOrBuilder * * *
-   * For daily cohorts, this will be the end day offset.
-   * For weekly cohorts, this will be the week offset.
+   * `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; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Dimension.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Dimension.java index c834f51c..5f4a7af9 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Dimension.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Dimension.java @@ -138,7 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * The name of the dimension. See the [API
-   * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+   * 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. For example if a `dimensionExpression` concatenates `country`
@@ -168,7 +168,7 @@ public java.lang.String getName() {
    *
    * 
    * The name of the dimension. See the [API
-   * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+   * 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. For example if a `dimensionExpression` concatenates `country`
@@ -599,7 +599,7 @@ public Builder mergeFrom(
      *
      * 
      * The name of the dimension. See the [API
-     * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+     * 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. For example if a `dimensionExpression` concatenates `country`
@@ -628,7 +628,7 @@ public java.lang.String getName() {
      *
      * 
      * The name of the dimension. See the [API
-     * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+     * 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. For example if a `dimensionExpression` concatenates `country`
@@ -657,7 +657,7 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      * 
      * The name of the dimension. See the [API
-     * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+     * 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. For example if a `dimensionExpression` concatenates `country`
@@ -685,7 +685,7 @@ public Builder setName(java.lang.String value) {
      *
      * 
      * The name of the dimension. See the [API
-     * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+     * 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. For example if a `dimensionExpression` concatenates `country`
@@ -709,7 +709,7 @@ public Builder clearName() {
      *
      * 
      * The name of the dimension. See the [API
-     * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+     * 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. For example if a `dimensionExpression` concatenates `country`
diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadata.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadata.java
index aaf5b4ea..5a351094 100644
--- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadata.java
+++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadata.java
@@ -105,6 +105,11 @@ private DimensionMetadata(
               deprecatedApiNames_.add(s);
               break;
             }
+          case 40:
+            {
+              customDefinition_ = input.readBool();
+              break;
+            }
           default:
             {
               if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -366,6 +371,24 @@ 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 @@ -392,6 +415,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io 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); } @@ -418,6 +444,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDeprecatedApiNamesList().size(); } + if (customDefinition_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, customDefinition_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -438,6 +467,7 @@ public boolean equals(final java.lang.Object obj) { 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; } @@ -459,6 +489,8 @@ public int hashCode() { 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; @@ -612,6 +644,8 @@ public Builder clear() { deprecatedApiNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + customDefinition_ = false; + return this; } @@ -648,6 +682,7 @@ public com.google.analytics.data.v1alpha.DimensionMetadata buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.deprecatedApiNames_ = deprecatedApiNames_; + result.customDefinition_ = customDefinition_; onBuilt(); return result; } @@ -720,6 +755,9 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.DimensionMetadata oth } onChanged(); } + if (other.getCustomDefinition() != false) { + setCustomDefinition(other.getCustomDefinition()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1275,6 +1313,58 @@ public Builder addDeprecatedApiNamesBytes(com.google.protobuf.ByteString value) 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); diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadataOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadataOrBuilder.java index bdf23666..eb97302b 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadataOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionMetadataOrBuilder.java @@ -164,4 +164,17 @@ public interface DimensionMetadataOrBuilder * @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-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionOrBuilder.java index 9f412c6a..00b91969 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/DimensionOrBuilder.java @@ -28,7 +28,7 @@ public interface DimensionOrBuilder * *
    * The name of the dimension. See the [API
-   * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+   * 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. For example if a `dimensionExpression` concatenates `country`
@@ -47,7 +47,7 @@ public interface DimensionOrBuilder
    *
    * 
    * The name of the dimension. See the [API
-   * Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions)
+   * 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. For example if a `dimensionExpression` concatenates `country`
diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Entity.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Entity.java
index 4e8665dc..140111da 100644
--- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Entity.java
+++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Entity.java
@@ -119,7 +119,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 
    * A Google Analytics GA4 property id. 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).
    * 
* * string property_id = 1; @@ -144,7 +144,7 @@ public java.lang.String getPropertyId() { *
    * A Google Analytics GA4 property id. 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).
    * 
* * string property_id = 1; @@ -486,7 +486,7 @@ public Builder mergeFrom( *
      * A Google Analytics GA4 property id. 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).
      * 
* * string property_id = 1; @@ -510,7 +510,7 @@ public java.lang.String getPropertyId() { *
      * A Google Analytics GA4 property id. 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).
      * 
* * string property_id = 1; @@ -534,7 +534,7 @@ public com.google.protobuf.ByteString getPropertyIdBytes() { *
      * A Google Analytics GA4 property id. 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).
      * 
* * string property_id = 1; @@ -557,7 +557,7 @@ public Builder setPropertyId(java.lang.String value) { *
      * A Google Analytics GA4 property id. 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).
      * 
* * string property_id = 1; @@ -576,7 +576,7 @@ public Builder clearPropertyId() { *
      * A Google Analytics GA4 property id. 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).
      * 
* * string property_id = 1; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/EntityOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/EntityOrBuilder.java index 0afcede0..4ac9335c 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/EntityOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/EntityOrBuilder.java @@ -29,7 +29,7 @@ public interface EntityOrBuilder *
    * A Google Analytics GA4 property id. 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).
    * 
* * string property_id = 1; @@ -43,7 +43,7 @@ public interface EntityOrBuilder *
    * A Google Analytics GA4 property id. 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).
    * 
* * string property_id = 1; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java index 084bfb37..5770e13b 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequest.java @@ -121,7 +121,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * 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 @@ -154,7 +154,7 @@ public java.lang.String getName() { * 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 @@ -507,7 +507,7 @@ public Builder mergeFrom( * 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 @@ -539,7 +539,7 @@ public java.lang.String getName() { * 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 @@ -571,7 +571,7 @@ public com.google.protobuf.ByteString getNameBytes() { * 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 @@ -602,7 +602,7 @@ public Builder setName(java.lang.String value) { * 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 @@ -629,7 +629,7 @@ public Builder clearName() { * 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 diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java index 1f4a7697..e2e088a3 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/GetMetadataRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetMetadataRequestOrBuilder * 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 @@ -53,7 +53,7 @@ public interface GetMetadataRequestOrBuilder * 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 diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java index 737811c7..9aad338b 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetadataName.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, @@ -23,18 +23,26 @@ 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 */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class MetadataName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + 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; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private MetadataName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - } - public static MetadataName of(String property) { return newBuilder().setProperty(property).build(); } @@ -64,7 +68,7 @@ public static MetadataName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY.validatedMatch( formattedString, "MetadataName.parse: formattedString not in valid format"); return of(matchMap.get("property")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (MetadataName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); + if (property != null) { + fieldMapBuilder.put("property", property); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property); + return PROPERTY.instantiate("property", property); } - /** Builder for MetadataName. */ - public static class Builder { + @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; } @@ -129,8 +157,6 @@ public Builder setProperty(String property) { return this; } - private Builder() {} - private Builder(MetadataName metadataName) { property = metadataName.property; } @@ -139,24 +165,4 @@ public MetadataName build() { return new MetadataName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof MetadataName) { - MetadataName that = (MetadataName) o; - return (this.property.equals(that.property)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - return h; - } } diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metric.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metric.java index 98c08526..8a5d0f6e 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metric.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/Metric.java @@ -133,7 +133,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * The name of the metric. See the [API
-   * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+   * 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.
    * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -163,7 +163,7 @@ public java.lang.String getName() {
    *
    * 
    * The name of the metric. See the [API
-   * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+   * 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.
    * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -614,7 +614,7 @@ public Builder mergeFrom(
      *
      * 
      * The name of the metric. See the [API
-     * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+     * 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.
      * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -643,7 +643,7 @@ public java.lang.String getName() {
      *
      * 
      * The name of the metric. See the [API
-     * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+     * 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.
      * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -672,7 +672,7 @@ public com.google.protobuf.ByteString getNameBytes() {
      *
      * 
      * The name of the metric. See the [API
-     * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+     * 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.
      * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -700,7 +700,7 @@ public Builder setName(java.lang.String value) {
      *
      * 
      * The name of the metric. See the [API
-     * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+     * 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.
      * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -724,7 +724,7 @@ public Builder clearName() {
      *
      * 
      * The name of the metric. See the [API
-     * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+     * 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.
      * For example if `expression` is `screenPageViews/sessions`, you could call
diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadata.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadata.java
index 51507f20..439bdaae 100644
--- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadata.java
+++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadata.java
@@ -121,6 +121,11 @@ private MetricMetadata(
               expression_ = s;
               break;
             }
+          case 56:
+            {
+              customDefinition_ = input.readBool();
+              break;
+            }
           default:
             {
               if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -471,6 +476,24 @@ public com.google.protobuf.ByteString getExpressionBytes() {
     }
   }
 
+  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 @@ -503,6 +526,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getExpressionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, expression_); } + if (customDefinition_ != false) { + output.writeBool(7, customDefinition_); + } unknownFields.writeTo(output); } @@ -535,6 +561,9 @@ public int getSerializedSize() { 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; @@ -557,6 +586,7 @@ public boolean equals(final java.lang.Object obj) { 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; } @@ -582,6 +612,8 @@ public int hashCode() { 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; @@ -739,6 +771,8 @@ public Builder clear() { expression_ = ""; + customDefinition_ = false; + return this; } @@ -777,6 +811,7 @@ public com.google.analytics.data.v1alpha.MetricMetadata buildPartial() { result.deprecatedApiNames_ = deprecatedApiNames_; result.type_ = type_; result.expression_ = expression_; + result.customDefinition_ = customDefinition_; onBuilt(); return result; } @@ -856,6 +891,9 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.MetricMetadata other) expression_ = other.expression_; onChanged(); } + if (other.getCustomDefinition() != false) { + setCustomDefinition(other.getCustomDefinition()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1617,6 +1655,58 @@ public Builder setExpressionBytes(com.google.protobuf.ByteString value) { 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); diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadataOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadataOrBuilder.java index 9dc60223..d1a21c7d 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadataOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricMetadataOrBuilder.java @@ -218,4 +218,17 @@ public interface MetricMetadataOrBuilder * @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-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricOrBuilder.java index f4535230..2d108c94 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/MetricOrBuilder.java @@ -28,7 +28,7 @@ public interface MetricOrBuilder * *
    * The name of the metric. See the [API
-   * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+   * 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.
    * For example if `expression` is `screenPageViews/sessions`, you could call
@@ -47,7 +47,7 @@ public interface MetricOrBuilder
    *
    * 
    * The name of the metric. See the [API
-   * Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics)
+   * 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.
    * For example if `expression` is `screenPageViews/sessions`, you could call
diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java
index 8d3f6a33..6b11ab86 100644
--- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java
+++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/ReportingApiProto.java
@@ -115,14 +115,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
       internal_static_google_analytics_data_v1alpha_Cohort_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_analytics_data_v1alpha_Cohort_fieldAccessorTable;
-  static final com.google.protobuf.Descriptors.Descriptor
-      internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor;
-  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_google_analytics_data_v1alpha_CohortReportSettings_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_analytics_data_v1alpha_CohortsRange_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_google_analytics_data_v1alpha_CohortsRange_fieldAccessorTable;
+  static final com.google.protobuf.Descriptors.Descriptor
+      internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor;
+  static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_google_analytics_data_v1alpha_CohortReportSettings_fieldAccessorTable;
   static final com.google.protobuf.Descriptors.Descriptor
       internal_static_google_analytics_data_v1alpha_ResponseMetaData_descriptor;
   static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -273,14 +273,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "le.analytics.data.v1alpha.CohortReportSe"
           + "ttings\"g\n\006Cohort\022\014\n\004name\030\001 \001(\t\022\021\n\tdimens"
           + "ion\030\002 \001(\t\022<\n\ndate_range\030\003 \001(\0132(.google.a"
-          + "nalytics.data.v1alpha.DateRange\"*\n\024Cohor"
-          + "tReportSettings\022\022\n\naccumulate\030\001 \001(\010\"\326\001\n\014"
-          + "CohortsRange\022L\n\013granularity\030\001 \001(\01627.goog"
-          + "le.analytics.data.v1alpha.CohortsRange.G"
-          + "ranularity\022\024\n\014start_offset\030\002 \001(\005\022\022\n\nend_"
-          + "offset\030\003 \001(\005\"N\n\013Granularity\022\033\n\027GRANULARI"
-          + "TY_UNSPECIFIED\020\000\022\t\n\005DAILY\020\001\022\n\n\006WEEKLY\020\002\022"
-          + "\013\n\007MONTHLY\020\003\"4\n\020ResponseMetaData\022 \n\030data"
+          + "nalytics.data.v1alpha.DateRange\"\326\001\n\014Coho"
+          + "rtsRange\022L\n\013granularity\030\001 \001(\01627.google.a"
+          + "nalytics.data.v1alpha.CohortsRange.Granu"
+          + "larity\022\024\n\014start_offset\030\002 \001(\005\022\022\n\nend_offs"
+          + "et\030\003 \001(\005\"N\n\013Granularity\022\033\n\027GRANULARITY_U"
+          + "NSPECIFIED\020\000\022\t\n\005DAILY\020\001\022\n\n\006WEEKLY\020\002\022\013\n\007M"
+          + "ONTHLY\020\003\"*\n\024CohortReportSettings\022\022\n\naccu"
+          + "mulate\030\001 \001(\010\"4\n\020ResponseMetaData\022 \n\030data"
           + "_loss_from_other_row\030\003 \001(\010\"\037\n\017DimensionH"
           + "eader\022\014\n\004name\030\001 \001(\t\"U\n\014MetricHeader\022\014\n\004n"
           + "ame\030\001 \001(\t\0227\n\004type\030\002 \001(\0162).google.analyti"
@@ -307,26 +307,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "rrors_per_project_per_hour\030\004 \001(\0132*.googl"
           + "e.analytics.data.v1alpha.QuotaStatus\"2\n\013"
           + "QuotaStatus\022\020\n\010consumed\030\001 \001(\005\022\021\n\tremaini"
-          + "ng\030\002 \001(\005\"i\n\021DimensionMetadata\022\020\n\010api_nam"
-          + "e\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\"\263\001\n\016"
-          + "MetricMetadata\022\020\n\010api_name\030\001 \001(\t\022\017\n\007ui_n"
-          + "ame\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022\034\n\024deprec"
-          + "ated_api_names\030\004 \003(\t\0227\n\004type\030\005 \001(\0162).goo"
-          + "gle.analytics.data.v1alpha.MetricType\022\022\n"
-          + "\nexpression\030\006 \001(\t*g\n\021MetricAggregation\022\""
-          + "\n\036METRIC_AGGREGATION_UNSPECIFIED\020\000\022\t\n\005TO"
-          + "TAL\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_UNSPECI"
-          + "FIED\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\rT"
-          + "YPE_STANDARD\020\010\022\021\n\rTYPE_CURRENCY\020\t\022\r\n\tTYP"
-          + "E_FEET\020\n\022\016\n\nTYPE_MILES\020\013\022\017\n\013TYPE_METERS\020"
-          + "\014\022\023\n\017TYPE_KILOMETERS\020\rB{\n!com.google.ana"
-          + "lytics.data.v1alphaB\021ReportingApiProtoP\001"
-          + "ZAgoogle.golang.org/genproto/googleapis/"
-          + "analytics/data/v1alpha;datab\006proto3"
+          + "ng\030\002 \001(\005\"\204\001\n\021DimensionMetadata\022\020\n\010api_na"
+          + "me\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\022\031\n\021"
+          + "custom_definition\030\005 \001(\010\"\316\001\n\016MetricMetada"
+          + "ta\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_nam"
+          + "es\030\004 \003(\t\0227\n\004type\030\005 \001(\0162).google.analytic"
+          + "s.data.v1alpha.MetricType\022\022\n\nexpression\030"
+          + "\006 \001(\t\022\031\n\021custom_definition\030\007 \001(\010*g\n\021Metr"
+          + "icAggregation\022\"\n\036METRIC_AGGREGATION_UNSP"
+          + "ECIFIED\020\000\022\t\n\005TOTAL\020\001\022\013\n\007MINIMUM\020\005\022\013\n\007MAX"
+          + "IMUM\020\006\022\t\n\005COUNT\020\004*\201\002\n\nMetricType\022\033\n\027METR"
+          + "IC_TYPE_UNSPECIFIED\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\021TYP"
+          + "E_MILLISECONDS\020\005\022\020\n\014TYPE_MINUTES\020\006\022\016\n\nTY"
+          + "PE_HOURS\020\007\022\021\n\rTYPE_STANDARD\020\010\022\021\n\rTYPE_CU"
+          + "RRENCY\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\rB{\n"
+          + "!com.google.analytics.data.v1alphaB\021Repo"
+          + "rtingApiProtoP\001ZAgoogle.golang.org/genpr"
+          + "oto/googleapis/analytics/data/v1alpha;da"
+          + "tab\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -519,21 +521,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
             new java.lang.String[] {
               "Name", "Dimension", "DateRange",
             });
-    internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor =
+    internal_static_google_analytics_data_v1alpha_CohortsRange_descriptor =
         getDescriptor().getMessageTypes().get(12);
-    internal_static_google_analytics_data_v1alpha_CohortReportSettings_fieldAccessorTable =
+    internal_static_google_analytics_data_v1alpha_CohortsRange_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-            internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor,
+            internal_static_google_analytics_data_v1alpha_CohortsRange_descriptor,
             new java.lang.String[] {
-              "Accumulate",
+              "Granularity", "StartOffset", "EndOffset",
             });
-    internal_static_google_analytics_data_v1alpha_CohortsRange_descriptor =
+    internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor =
         getDescriptor().getMessageTypes().get(13);
-    internal_static_google_analytics_data_v1alpha_CohortsRange_fieldAccessorTable =
+    internal_static_google_analytics_data_v1alpha_CohortReportSettings_fieldAccessorTable =
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-            internal_static_google_analytics_data_v1alpha_CohortsRange_descriptor,
+            internal_static_google_analytics_data_v1alpha_CohortReportSettings_descriptor,
             new java.lang.String[] {
-              "Granularity", "StartOffset", "EndOffset",
+              "Accumulate",
             });
     internal_static_google_analytics_data_v1alpha_ResponseMetaData_descriptor =
         getDescriptor().getMessageTypes().get(14);
@@ -632,7 +634,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_analytics_data_v1alpha_DimensionMetadata_descriptor,
             new java.lang.String[] {
-              "ApiName", "UiName", "Description", "DeprecatedApiNames",
+              "ApiName", "UiName", "Description", "DeprecatedApiNames", "CustomDefinition",
             });
     internal_static_google_analytics_data_v1alpha_MetricMetadata_descriptor =
         getDescriptor().getMessageTypes().get(26);
@@ -640,7 +642,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_google_analytics_data_v1alpha_MetricMetadata_descriptor,
             new java.lang.String[] {
-              "ApiName", "UiName", "Description", "DeprecatedApiNames", "Type", "Expression",
+              "ApiName",
+              "UiName",
+              "Description",
+              "DeprecatedApiNames",
+              "Type",
+              "Expression",
+              "CustomDefinition",
             });
   }
 
diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequest.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequest.java
index 2f702b72..eebe8826 100644
--- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequest.java
+++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequest.java
@@ -240,7 +240,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    * 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/trusted-testing/analytics-data/property-id).
+   * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
    * Example: properties/1234
    * 
* @@ -267,7 +267,7 @@ public 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -1365,7 +1365,7 @@ public Builder mergeFrom( * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -1391,7 +1391,7 @@ public 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -1417,7 +1417,7 @@ public com.google.protobuf.ByteString getPropertyBytes() { * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -1442,7 +1442,7 @@ public Builder setProperty(java.lang.String value) { * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -1463,7 +1463,7 @@ public Builder clearProperty() { * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequestOrBuilder.java index 55529cc3..e1bf4a2c 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequestOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunRealtimeReportRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface RunRealtimeReportRequestOrBuilder * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* @@ -46,7 +46,7 @@ public interface RunRealtimeReportRequestOrBuilder * 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/trusted-testing/analytics-data/property-id). + * ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). * Example: properties/1234 *
* diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequest.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequest.java index e0d9546b..236ffac1 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequest.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequest.java @@ -575,7 +575,7 @@ public com.google.analytics.data.v1alpha.DateRangeOrBuilder getDateRangesOrBuild *
    * The row count of the start row. The first row is counted as row 0.
    * To learn more about this pagination parameter, see
-   * [Pagination](basics#pagination).
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
    * 
* * int64 offset = 5; @@ -596,7 +596,7 @@ public long getOffset() { * The number of rows to return. If unspecified, 10 rows are returned. If * -1, all rows are returned. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int64 limit = 6; @@ -3105,7 +3105,7 @@ public com.google.analytics.data.v1alpha.DateRange.Builder addDateRangesBuilder( *
      * The row count of the start row. The first row is counted as row 0.
      * To learn more about this pagination parameter, see
-     * [Pagination](basics#pagination).
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
      * 
* * int64 offset = 5; @@ -3122,7 +3122,7 @@ public long getOffset() { *
      * The row count of the start row. The first row is counted as row 0.
      * To learn more about this pagination parameter, see
-     * [Pagination](basics#pagination).
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
      * 
* * int64 offset = 5; @@ -3142,7 +3142,7 @@ public Builder setOffset(long value) { *
      * The row count of the start row. The first row is counted as row 0.
      * To learn more about this pagination parameter, see
-     * [Pagination](basics#pagination).
+     * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
      * 
* * int64 offset = 5; @@ -3164,7 +3164,7 @@ public Builder clearOffset() { * The number of rows to return. If unspecified, 10 rows are returned. If * -1, all rows are returned. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int64 limit = 6; @@ -3182,7 +3182,7 @@ public long getLimit() { * The number of rows to return. If unspecified, 10 rows are returned. If * -1, all rows are returned. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int64 limit = 6; @@ -3203,7 +3203,7 @@ public Builder setLimit(long value) { * The number of rows to return. If unspecified, 10 rows are returned. If * -1, all rows are returned. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int64 limit = 6; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequestOrBuilder.java index ad71713d..bd618d00 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequestOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportRequestOrBuilder.java @@ -243,7 +243,7 @@ public interface RunReportRequestOrBuilder *
    * The row count of the start row. The first row is counted as row 0.
    * To learn more about this pagination parameter, see
-   * [Pagination](basics#pagination).
+   * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).
    * 
* * int64 offset = 5; @@ -259,7 +259,7 @@ public interface RunReportRequestOrBuilder * The number of rows to return. If unspecified, 10 rows are returned. If * -1, all rows are returned. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int64 limit = 6; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java index 8dda99a0..e793aaa4 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponse.java @@ -673,7 +673,7 @@ public com.google.analytics.data.v1alpha.RowOrBuilder getMinimumsOrBuilder(int i * includes limit = 50 in the API request, the response will contain row_count * = 175 but only 50 rows. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int32 row_count = 12; @@ -3642,7 +3642,7 @@ public java.util.List getMinimums * includes limit = 50 in the API request, the response will contain row_count * = 175 but only 50 rows. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int32 row_count = 12; @@ -3662,7 +3662,7 @@ public int getRowCount() { * includes limit = 50 in the API request, the response will contain row_count * = 175 but only 50 rows. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int32 row_count = 12; @@ -3685,7 +3685,7 @@ public Builder setRowCount(int value) { * includes limit = 50 in the API request, the response will contain row_count * = 175 but only 50 rows. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). *
* * int32 row_count = 12; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java index b5ba38a0..b0a27ef2 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunReportResponseOrBuilder.java @@ -353,7 +353,7 @@ com.google.analytics.data.v1alpha.DimensionHeaderOrBuilder getDimensionHeadersOr * includes limit = 50 in the API request, the response will contain row_count * = 175 but only 50 rows. * To learn more about this pagination parameter, see - * [Pagination](basics#pagination). + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). * * * int32 row_count = 12; diff --git a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto index cabd1736..7f5f9f9b 100644 --- a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto +++ b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/analytics_data_api.proto @@ -145,14 +145,14 @@ message RunReportRequest { // The row count of the start row. The first row is counted as row 0. // // To learn more about this pagination parameter, see - // [Pagination](basics#pagination). + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). int64 offset = 5; // The number of rows to return. If unspecified, 10 rows are returned. If // -1, all rows are returned. // // To learn more about this pagination parameter, see - // [Pagination](basics#pagination). + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). int64 limit = 6; // Aggregation of metrics. Aggregated metric values will be shown in rows @@ -217,7 +217,7 @@ message RunReportResponse { // = 175 but only 50 rows. // // To learn more about this pagination parameter, see - // [Pagination](basics#pagination). + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). int32 row_count = 12; // Metadata for the report. @@ -388,7 +388,7 @@ message GetMetadataRequest { // 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 // @@ -408,7 +408,7 @@ 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/trusted-testing/analytics-data/property-id). + // ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // // Example: properties/1234 string property = 1; diff --git a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto index a1df5efe..aafd1768 100644 --- a/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto +++ b/proto-google-analytics-data-v1alpha/src/main/proto/google/analytics/data/v1alpha/data.proto @@ -47,7 +47,7 @@ message DateRange { message Entity { // A Google Analytics GA4 property id. 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). string property_id = 1; } @@ -57,7 +57,7 @@ message Entity { // Requests are allowed up to 8 dimensions. message Dimension { // The name of the dimension. See the [API - // Dimensions](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#dimensions) + // 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 @@ -120,7 +120,7 @@ message DimensionExpression { // metrics. message Metric { // The name of the metric. See the [API - // Metrics](https://developers.google.com/analytics/trusted-testing/analytics-data/api-schema#metrics) + // 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. @@ -399,20 +399,35 @@ message Pivot { repeated MetricAggregation metric_aggregations = 5; } -// Specification for a cohort report. +// Specification of cohorts for a cohort report. +// Cohort reports can be used for example to 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. +// +// 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 { - // The definition for the 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 Cohort cohorts = 1; - // The data ranges of cohorts. + // 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; - // Settings of a cohort report. + // Optional settings for a cohort report. CohortReportSettings cohort_report_settings = 3; } -// Defines a cohort. A cohort is a group of users who share a common -// characteristic. For example, all users with the same acquisition date +// Defines a cohort selection criteria. A cohort is a group of users who share +// a common characteristic. For example, users with the same `firstTouchDate` // belong to the same cohort. message Cohort { // Assigns a name to this cohort. The dimension `cohort` is valued to this @@ -421,61 +436,92 @@ message Cohort { // `cohort_0`, `cohort_1`, etc. string name = 1; - // The dimension used by cohort. Only supports `firstTouchDate` for retention - // report. + // Dimension used by the cohort. Required and only supports `firstTouchDate`. string dimension = 2; - // The cohort selects users whose first visit date is between start date - // and end date defined in the `dateRange`. In a cohort request, this - // `dateRange` is required and the `dateRanges` in the `RunReportRequest` or - // `RunPivotReportRequest` must be unspecified. + // 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. // - // The date range should be aligned with the cohort's granularity. If - // CohortsRange uses daily granularity, the date range can be aligned to any - // day. If CohortsRange uses weekly granularity, the date range should be - // aligned to the week boundary, starting at Sunday and ending Saturday. If - // CohortsRange uses monthly granularity, the date range should be aligned to - // the month, starting at the first and ending on the last day of the month. + // 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; } -// Settings of a cohort report. -message CohortReportSettings { - // If true, accumulates the result from first visit day to the end day. Not - // supported in `RunReportRequest`. - bool accumulate = 1; -} - -// Describes date range for a cohort report. +// Configures the extended reporting date range for a cohort report. Specifies +// an offset duration to follow the cohorts over. message CohortsRange { - // Reporting granularity for the cohorts. + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. enum Granularity { - // Unspecified. + // Should never be specified. GRANULARITY_UNSPECIFIED = 0; - // Daily + // Daily granularity. Commonly used if the cohort's `dateRange` is a single + // day and the request contains `cohortNthDay`. DAILY = 1; - // Weekly + // 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 + // Monthly granularity. Commonly used if the cohort's `dateRange` is a month + // in duration and the request contains `cohortNthMonth`. MONTHLY = 3; } - // Reporting date range for each cohort is calculated based on these three - // fields. + // The granularity used to interpret the `startOffset` and `endOffset` for the + // extended reporting date range for a cohort report. Granularity granularity = 1; - // For daily cohorts, this will be the start day offset. - // For weekly cohorts, this will be the week offset. + // `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; - // For daily cohorts, this will be the end day offset. - // For weekly cohorts, this will be the week offset. + // `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 @@ -650,6 +696,9 @@ message DimensionMetadata { // 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. @@ -678,6 +727,9 @@ message MetricMetadata { // [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. diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 65d31988..c048944f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.analytics google-analytics-data - 0.5.1 + 0.5.2 diff --git a/synth.metadata b/synth.metadata index 45b9716e..80332ec6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-data.git", - "sha": "f85044f96b209dd684feb787996838a159451a07" + "sha": "855e894350f87718374243c1a9464dc181e2fb1d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b7038c181dcaa75c4fe8270b842c941d1df3128c", - "internalRef": "341924087" + "sha": "857f70daef9f4c38f042fb3dfb7b8423ae18fd19", + "internalRef": "346372957" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "943bb78606d035001123030067dffcc34f4645f2" + "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" } } ], diff --git a/versions.txt b/versions.txt index 6477f7d2..289a6b27 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-analytics-data:0.5.1:0.5.1 -proto-google-analytics-data-v1alpha:0.5.1:0.5.1 -grpc-google-analytics-data-v1alpha:0.5.1:0.5.1 \ No newline at end of file +google-analytics-data:0.5.2:0.5.2 +proto-google-analytics-data-v1alpha:0.5.2:0.5.2 +grpc-google-analytics-data-v1alpha:0.5.2:0.5.2 \ No newline at end of file