Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [analyticsdata] add subject_to_thresholding field to ResponseMetadata type #8545

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions java-analytics-data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.analytics</groupId>
<artifactId>google-analytics-data</artifactId>
<version>0.14.7</version>
<version>0.14.9</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.analytics:google-analytics-data:0.14.7'
implementation 'com.google.analytics:google-analytics-data:0.14.9'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.14.7"
libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.14.9"
```

## Authentication
Expand Down Expand Up @@ -73,38 +73,6 @@ use this Analytics Data Client Library.



## Samples

Samples are in the [`samples/`](https://github.com/googleapis/java-analytics-data/tree/main/samples) directory.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Get Common Metadata Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/GetCommonMetadataSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/GetCommonMetadataSample.java) |
| Get Metadata By Property Id Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/GetMetadataByPropertyIdSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/GetMetadataByPropertyIdSample.java) |
| Quickstart Json Credentials Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/QuickstartJsonCredentialsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/QuickstartJsonCredentialsSample.java) |
| Quickstart Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/QuickstartSample.java) |
| Run Batch Report Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunBatchReportSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunBatchReportSample.java) |
| Run Pivot Report Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunPivotReportSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunPivotReportSample.java) |
| Run Realtime Report Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java) |
| Run Realtime Report With Multiple Dimensions Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java) |
| Run Realtime Report With Multiple Metrics Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java) |
| Run Report Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportSample.java) |
| Run Report With Aggregations Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithAggregationsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithAggregationsSample.java) |
| Run Report With Cohorts Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithCohortsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithCohortsSample.java) |
| Run Report With Date Ranges Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithDateRangesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithDateRangesSample.java) |
| Run Report With Dimension And Metric Filters Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionAndMetricFiltersSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionAndMetricFiltersSample.java) |
| Run Report With Dimension Exclude Filter Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionExcludeFilterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionExcludeFilterSample.java) |
| Run Report With Dimension Filter Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionFilterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionFilterSample.java) |
| Run Report With Dimension In List Filter Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionInListFilterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithDimensionInListFilterSample.java) |
| Run Report With Multiple Dimension Filters Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleDimensionFiltersSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleDimensionFiltersSample.java) |
| Run Report With Multiple Dimensions Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleDimensionsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleDimensionsSample.java) |
| Run Report With Multiple Metrics Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleMetricsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithMultipleMetricsSample.java) |
| Run Report With Named Date Ranges Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithNamedDateRangesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithNamedDateRangesSample.java) |
| Run Report With Ordering Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithOrderingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithOrderingSample.java) |
| Run Report With Pagination Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithPaginationSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithPaginationSample.java) |
| Run Report With Property Quota Sample | [source code](https://github.com/googleapis/java-analytics-data/blob/main/samples/snippets/src/main/java/com/example/analytics/RunReportWithPropertyQuotaSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-data&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analytics/RunReportWithPropertyQuotaSample.java) |



## Troubleshooting

Expand Down
10 changes: 5 additions & 5 deletions java-analytics-data/google-analytics-data-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@
<dependency>
<groupId>com.google.analytics</groupId>
<artifactId>google-analytics-data</artifactId>
<version>0.14.4-SNAPSHOT</version><!-- {x-version-update:google-analytics-data:current} -->
<version>0.14.8-SNAPSHOT</version><!-- {x-version-update:google-analytics-data:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-analytics-data-v1beta</artifactId>
<version>0.14.4-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1beta:current} -->
<version>0.14.8-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1beta:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-analytics-data-v1alpha</artifactId>
<version>0.14.4-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1alpha:current} -->
<version>0.14.8-SNAPSHOT</version><!-- {x-version-update:grpc-google-analytics-data-v1alpha:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-analytics-data-v1beta</artifactId>
<version>0.14.4-SNAPSHOT</version><!-- {x-version-update:proto-google-analytics-data-v1beta:current} -->
<version>0.14.8-SNAPSHOT</version><!-- {x-version-update:proto-google-analytics-data-v1beta:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-analytics-data-v1alpha</artifactId>
<version>0.14.4-SNAPSHOT</version><!-- {x-version-update:proto-google-analytics-data-v1alpha:current} -->
<version>0.14.8-SNAPSHOT</version><!-- {x-version-update:proto-google-analytics-data-v1alpha:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ public BetaAnalyticsDataStub 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.
*
* <p>For a guide to constructing requests &amp; understanding responses, see [Creating a
* Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -241,6 +244,9 @@ public final RunReportResponse runReport(RunReportRequest request) {
* 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.
*
* <p>For a guide to constructing requests &amp; understanding responses, see [Creating a
* Report](https://developers.google.com/analytics/devguides/reporting/data/v1/basics).
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -627,8 +633,14 @@ public final UnaryCallable<GetMetadataRequest, Metadata> getMetadataCallable() {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* The Google Analytics Realtime API returns a customized report of realtime event data for your
* property. These reports show events and usage from the last 30 minutes.
* Returns a customized report of realtime event data for your property. Events appear in realtime
* reports seconds after they have been sent to the Google Analytics. Realtime reports show events
* and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to
* 60 minutes for Google Analytics 360 properties).
*
* <p>For a guide to constructing realtime requests &amp; understanding responses, see [Creating a
* Realtime
* Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
*
* <p>Sample code:
*
Expand Down Expand Up @@ -665,8 +677,14 @@ public final RunRealtimeReportResponse runRealtimeReport(RunRealtimeReportReques

// 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.
* Returns a customized report of realtime event data for your property. Events appear in realtime
* reports seconds after they have been sent to the Google Analytics. Realtime reports show events
* and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to
* 60 minutes for Google Analytics 360 properties).
*
* <p>For a guide to constructing realtime requests &amp; understanding responses, see [Creating a
* Realtime
* Report](https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics).
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Google Analytics Data API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= BetaAnalyticsDataClient =======================
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ public static class Builder extends StubSettings.Builder<BetaAnalyticsDataStubSe
ImmutableMap.builder();
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList()));
definitions.put(
"retry_policy_0_codes",
ImmutableSet.copyOf(Lists.<StatusCode.Code>newArrayList(StatusCode.Code.UNKNOWN)));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}

Expand All @@ -312,17 +309,6 @@ public static class Builder extends StubSettings.Builder<BetaAnalyticsDataStubSe
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("no_retry_1_params", settings);
settings =
RetrySettings.newBuilder()
.setInitialRetryDelay(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
.setMaxRetryDelay(Duration.ofMillis(60000L))
.setInitialRpcTimeout(Duration.ofMillis(60000L))
.setRpcTimeoutMultiplier(1.0)
.setMaxRpcTimeout(Duration.ofMillis(60000L))
.setTotalTimeout(Duration.ofMillis(60000L))
.build();
definitions.put("retry_policy_0_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
}

Expand Down Expand Up @@ -424,8 +410,8 @@ private static Builder initDefaults(Builder builder) {

builder
.getMetadataSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

builder
.runRealtimeReportSettings()
Expand All @@ -434,8 +420,8 @@ private static Builder initDefaults(Builder builder) {

builder
.checkCompatibilitySettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

return builder;
}
Expand Down
Loading