From d39cc8ca75d73af661efc7820833c2583bb3b670 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 04:00:25 +0000 Subject: [PATCH 01/12] chore(main): release 0.13.1-SNAPSHOT (#502) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-analytics-data-bom/pom.xml | 12 ++++++------ google-analytics-data/pom.xml | 4 ++-- grpc-google-analytics-data-v1alpha/pom.xml | 4 ++-- grpc-google-analytics-data-v1beta/pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-analytics-data-v1alpha/pom.xml | 4 ++-- proto-google-analytics-data-v1beta/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 +++++----- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/google-analytics-data-bom/pom.xml b/google-analytics-data-bom/pom.xml index 58e51b7a..05dc3066 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.13.0 + 0.13.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.analytics google-analytics-data - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc proto-google-analytics-data-v1alpha - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/google-analytics-data/pom.xml b/google-analytics-data/pom.xml index df921937..1c51b291 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.13.0 + 0.13.1-SNAPSHOT jar Google Analytics Data https://github.com/googleapis/java-analytics-data @@ -11,7 +11,7 @@ com.google.analytics google-analytics-data-parent - 0.13.0 + 0.13.1-SNAPSHOT google-analytics-data diff --git a/grpc-google-analytics-data-v1alpha/pom.xml b/grpc-google-analytics-data-v1alpha/pom.xml index 16532d45..96fd065a 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.13.0 + 0.13.1-SNAPSHOT grpc-google-analytics-data-v1alpha GRPC library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/grpc-google-analytics-data-v1beta/pom.xml b/grpc-google-analytics-data-v1beta/pom.xml index c3f6d00c..66e9377b 100644 --- a/grpc-google-analytics-data-v1beta/pom.xml +++ b/grpc-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT grpc-google-analytics-data-v1beta GRPC library for grpc-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 496cc5b5..6ca29fb6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-data-parent pom - 0.13.0 + 0.13.1-SNAPSHOT Google Analytics Data Parent https://github.com/googleapis/java-analytics-data @@ -61,27 +61,27 @@ com.google.analytics google-analytics-data - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc proto-google-analytics-data-v1alpha - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/proto-google-analytics-data-v1alpha/pom.xml b/proto-google-analytics-data-v1alpha/pom.xml index c877d9d4..d4fb8d25 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.13.0 + 0.13.1-SNAPSHOT proto-google-analytics-data-v1alpha Proto library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/proto-google-analytics-data-v1beta/pom.xml b/proto-google-analytics-data-v1beta/pom.xml index 100c493b..fb238932 100644 --- a/proto-google-analytics-data-v1beta/pom.xml +++ b/proto-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.0 + 0.13.1-SNAPSHOT proto-google-analytics-data-v1beta PROTO library for proto-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 41733146..bef01bc8 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -40,7 +40,7 @@ com.google.analytics google-analytics-data - 0.13.0 + 0.13.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index e404ca40..0c2dfc84 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-analytics-data:0.13.0:0.13.0 -grpc-google-analytics-data-v1beta:0.13.0:0.13.0 -proto-google-analytics-data-v1beta:0.13.0:0.13.0 -proto-google-analytics-data-v1alpha:0.13.0:0.13.0 -grpc-google-analytics-data-v1alpha:0.13.0:0.13.0 +google-analytics-data:0.13.0:0.13.1-SNAPSHOT +grpc-google-analytics-data-v1beta:0.13.0:0.13.1-SNAPSHOT +proto-google-analytics-data-v1beta:0.13.0:0.13.1-SNAPSHOT +proto-google-analytics-data-v1alpha:0.13.0:0.13.1-SNAPSHOT +grpc-google-analytics-data-v1alpha:0.13.0:0.13.1-SNAPSHOT From df2dc50296d3dd2da4a4f5eecdc63deb79ab1d6a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 00:24:24 +0200 Subject: [PATCH 02/12] chore(deps): update dependency com.google.analytics:google-analytics-data to v0.13.0 (#503) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.analytics:google-analytics-data](https://togithub.com/googleapis/java-analytics-data) | `0.12.0` -> `0.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.analytics:google-analytics-data/0.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.analytics:google-analytics-data/0.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.analytics:google-analytics-data/0.13.0/compatibility-slim/0.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.analytics:google-analytics-data/0.13.0/confidence-slim/0.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-analytics-data). --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aafaba93..eaf565c3 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-data - 0.12.0 + 0.13.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.analytics:google-analytics-data:0.12.0' +implementation 'com.google.analytics:google-analytics-data:0.13.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.12.0" +libraryDependencies += "com.google.analytics" % "google-analytics-data" % "0.13.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 5bd9739d..88a7b3a0 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.analytics google-analytics-data - 0.12.0 + 0.13.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ae108661..bc92f84c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -40,7 +40,7 @@ com.google.analytics google-analytics-data - 0.12.0 + 0.13.0 com.google.auth From b87dec12952020739ab87d947e8628732ef877fd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 04:08:32 +0000 Subject: [PATCH 03/12] chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 (#501) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 --- .../analytics/data/v1alpha/AlphaAnalyticsDataClient.java | 3 --- .../data/v1alpha/stub/AlphaAnalyticsDataStubSettings.java | 1 - .../google/analytics/data/v1beta/BetaAnalyticsDataClient.java | 3 --- .../data/v1beta/stub/BetaAnalyticsDataStubSettings.java | 1 - 4 files changed, 8 deletions(-) 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 37078f50..908ec2a1 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 @@ -129,7 +129,6 @@ 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 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) { return new AlphaAnalyticsDataClient(stub); } @@ -144,7 +143,6 @@ protected AlphaAnalyticsDataClient(AlphaAnalyticsDataSettings settings) throws I this.stub = ((AlphaAnalyticsDataStubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected AlphaAnalyticsDataClient(AlphaAnalyticsDataStub stub) { this.settings = null; this.stub = stub; @@ -154,7 +152,6 @@ public final AlphaAnalyticsDataSettings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public AlphaAnalyticsDataStub getStub() { return stub; } 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 b0a94da0..62618585 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 @@ -96,7 +96,6 @@ public class AlphaAnalyticsDataStubSettings extends StubSettings getMetadataSettings() { return checkCompatibilitySettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BetaAnalyticsDataStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() From 92743376c5b6e42e7b2537418720c8ea0721d922 Mon Sep 17 00:00:00 2001 From: Anwesha Date: Fri, 27 May 2022 05:30:30 -0400 Subject: [PATCH 04/12] samples: add Java samples for RunRealtimeReport (#475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * A copy sample to test fork process * Adds sample RunReportSample * Modifies runReport sample to have headers printed * Addresses comment differences inbetween python and java sample * Changes println to printf for consistency * Test for run report * Fixes a matching tag * Fixes checkstyle violation * -Another commit to fix checkstyle violations * Changes to linting * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Adds samples related to date ranges for java * Removes spaces in readme * Fixes spacing * Fixes linting * Fixes linting violations * Adds java samples with multiple metrics/dimensions * Fixes lines in README * Adds Java samples for dimension filters * Adds java samples related to dimension filters * Adds Java samples for RunRealtimeReport * Style changes on comment * Comment changes on files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Fixes incorrect metric * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: ikuleshov --- README.md | 3 + .../analytics/RunRealtimeReportSample.java | 95 +++++++++++++++++++ ...imeReportWithMultipleDimensionsSample.java | 71 ++++++++++++++ ...altimeReportWithMultipleMetricsSample.java | 71 ++++++++++++++ .../RunRealtimeReportSampleTest.java | 54 +++++++++++ ...eportWithMultipleDimensionsSampleTest.java | 55 +++++++++++ ...meReportWithMultipleMetricsSampleTest.java | 55 +++++++++++ 7 files changed, 404 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java create mode 100644 samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java create mode 100644 samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java create mode 100644 samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportSampleTest.java create mode 100644 samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSampleTest.java create mode 100644 samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSampleTest.java diff --git a/README.md b/README.md index eaf565c3..29810c23 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,9 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-analytics-dat | 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) | diff --git a/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java new file mode 100644 index 00000000..c39a7f78 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportSample.java @@ -0,0 +1,95 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +/* Google Analytics Data API sample application demonstrating the creation of +a realtime report. + +See https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport +for more information. + +Before you start the application, please review the comments starting with +"TODO(developer)" and update the code to use correct values. + +To run this sample using Maven: + cd java-analytics-data/samples/snippets + mvn compile + mvn exec:java -Dexec.mainClass="com.example.analytics.RunRealtimeReportSample" + */ + +// [START analyticsdata_run_realtime_report] + +import com.google.analytics.data.v1beta.BetaAnalyticsDataClient; +import com.google.analytics.data.v1beta.Dimension; +import com.google.analytics.data.v1beta.DimensionHeader; +import com.google.analytics.data.v1beta.Metric; +import com.google.analytics.data.v1beta.MetricHeader; +import com.google.analytics.data.v1beta.Row; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; + +public class RunRealtimeReportSample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace with your Google Analytics 4 property ID before running the sample. + String propertyId = "YOUR-GA4-PROPERTY-ID"; + sampleRunRealtimeReport(propertyId); + } + + // Runs a realtime report on a Google Analytics 4 property. + static void sampleRunRealtimeReport(String propertyId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (BetaAnalyticsDataClient analyticsData = BetaAnalyticsDataClient.create()) { + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("properties/" + propertyId) + .addDimensions(Dimension.newBuilder().setName("country")) + .addMetrics(Metric.newBuilder().setName("activeUsers")) + .build(); + + // Make the request. + RunRealtimeReportResponse response = analyticsData.runRealtimeReport(request); + printRunRealtimeReportResponse(response); + } + } + + // Prints results of a runRealReport call. + static void printRunRealtimeReportResponse(RunRealtimeReportResponse response) { + // [START analyticsdata_print_run_realtime_report_response_header] + System.out.printf("%s rows received%n", response.getRowsList().size()); + + for (DimensionHeader header : response.getDimensionHeadersList()) { + System.out.printf("Dimension header name: %s%n", header.getName()); + } + + for (MetricHeader header : response.getMetricHeadersList()) { + System.out.printf("Metric header name: %s (%s)%n", header.getName(), header.getType()); + } + // [END analyticsdata_print_run_realtime_report_response_header] + + // [START analyticsdata_print_run_realtime_report_response_rows] + System.out.println("Report result:"); + for (Row row : response.getRowsList()) { + System.out.printf( + "%s, %s%n", row.getDimensionValues(0).getValue(), row.getMetricValues(0).getValue()); + } + // [END analyticsdata_print_run_realtime_report_response_rows] + } +} +// [END analyticsdata_run_realtime_report] diff --git a/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java new file mode 100644 index 00000000..ee6da60b --- /dev/null +++ b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSample.java @@ -0,0 +1,71 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +/* Google Analytics Data API sample application demonstrating the creation of +a realtime report. + +See https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport +for more information. + +Before you start the application, please review the comments starting with +"TODO(developer)" and update the code to use correct values. + +To run this sample using Maven: + cd java-analytics-data/samples/snippets + mvn compile +mvn exec:java -Dexec.mainClass="com.example.analytics.RunRealtimeReportWithMultipleDimensionsSample" + */ + +// [START analyticsdata_run_realtime_report_with_multiple_dimensions] + +import com.google.analytics.data.v1beta.BetaAnalyticsDataClient; +import com.google.analytics.data.v1beta.Dimension; +import com.google.analytics.data.v1beta.Metric; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; + +public class RunRealtimeReportWithMultipleDimensionsSample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace with your Google Analytics 4 property ID before running the sample. + String propertyId = "YOUR-GA4-PROPERTY-ID"; + sampleRunRealtimeReportWithMultipleDimensions(propertyId); + } + + // Runs a realtime report on a Google Analytics 4 property. + static void sampleRunRealtimeReportWithMultipleDimensions(String propertyId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (BetaAnalyticsDataClient analyticsData = BetaAnalyticsDataClient.create()) { + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("properties/" + propertyId) + .addDimensions(Dimension.newBuilder().setName("country")) + .addDimensions(Dimension.newBuilder().setName(("city"))) + .addMetrics(Metric.newBuilder().setName("activeUsers")) + .build(); + + // Make the request. + RunRealtimeReportResponse response = analyticsData.runRealtimeReport(request); + // Prints the response using a method in RunRealtimeReportSample.java + RunRealtimeReportSample.printRunRealtimeReportResponse(response); + } + } +} +// [END analyticsdata_run_realtime_report_with_multiple_dimensions] diff --git a/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java new file mode 100644 index 00000000..1141c1f2 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSample.java @@ -0,0 +1,71 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +/* Google Analytics Data API sample application demonstrating the creation of +a realtime report. + +See https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runRealtimeReport +for more information. + +Before you start the application, please review the comments starting with +"TODO(developer)" and update the code to use correct values. + +To run this sample using Maven: + cd java-analytics-data/samples/snippets + mvn compile + mvn exec:java -Dexec.mainClass="com.example.analytics.RunRealtimeReportWithMultipleMetricsSample" + */ + +// [START analyticsdata_run_realtime_report_with_multiple_metrics] + +import com.google.analytics.data.v1beta.BetaAnalyticsDataClient; +import com.google.analytics.data.v1beta.Dimension; +import com.google.analytics.data.v1beta.Metric; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; + +public class RunRealtimeReportWithMultipleMetricsSample { + + public static void main(String... args) throws Exception { + // TODO(developer): Replace with your Google Analytics 4 property ID before running the sample. + String propertyId = "YOUR-GA4-PROPERTY-ID"; + sampleRunRealtimeReportWithMultipleMetrics(propertyId); + } + + // Runs a realtime report on a Google Analytics 4 property. + static void sampleRunRealtimeReportWithMultipleMetrics(String propertyId) throws Exception { + // Initialize client that will be used to send requests. This client only needs to be created + // once, and can be reused for multiple requests. After completing all of your requests, call + // the "close" method on the client to safely clean up any remaining background resources. + try (BetaAnalyticsDataClient analyticsData = BetaAnalyticsDataClient.create()) { + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("properties/" + propertyId) + .addDimensions(Dimension.newBuilder().setName("unifiedScreenName")) + .addMetrics(Metric.newBuilder().setName(("screenPageViews"))) + .addMetrics(Metric.newBuilder().setName("conversions")) + .build(); + + // Make the request. + RunRealtimeReportResponse response = analyticsData.runRealtimeReport(request); + // Prints the response using a method in RunRealtimeReportSample.java + RunRealtimeReportSample.printRunRealtimeReportResponse(response); + } + } +} +// [END analyticsdata_run_realtime_report_with_multiple_metrics] diff --git a/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportSampleTest.java b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportSampleTest.java new file mode 100644 index 00000000..0f6ff8b1 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportSampleTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for the RunRealtimeReport sample. */ +@RunWith(JUnit4.class) +public class RunRealtimeReportSampleTest { + + private String ga4PropertyId = + System.getProperty("analyticsdata.quickstart.ga4PropertyId", "222596558"); + + private String runSample(String ga4PropertyId) throws Exception { + PrintStream stdOut = System.out; + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + PrintStream out = new PrintStream(bout); + System.setOut(out); + + // Run the test using default system credentials. + RunRealtimeReportSample.sampleRunRealtimeReport(ga4PropertyId); + System.setOut(stdOut); + return bout.toString(); + } + + @Test + public void testRunRealtimeReport() throws Exception { + // Act + String out = runSample(ga4PropertyId); + + // Assert + assertThat(out).contains("Report result:"); + } +} diff --git a/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSampleTest.java b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSampleTest.java new file mode 100644 index 00000000..1d392d4d --- /dev/null +++ b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleDimensionsSampleTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for the RunRealtimeReportWithMultipleDimensions sample. */ +@RunWith(JUnit4.class) +public class RunRealtimeReportWithMultipleDimensionsSampleTest { + + private String ga4PropertyId = + System.getProperty("analyticsdata.quickstart.ga4PropertyId", "222596558"); + + private String runSample(String ga4PropertyId) throws Exception { + PrintStream stdOut = System.out; + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + PrintStream out = new PrintStream(bout); + System.setOut(out); + + // Run the test using default system credentials. + RunRealtimeReportWithMultipleDimensionsSample.sampleRunRealtimeReportWithMultipleDimensions( + ga4PropertyId); + System.setOut(stdOut); + return bout.toString(); + } + + @Test + public void testRunRealtimeReportWithMultipleDimensions() throws Exception { + // Act + String out = runSample(ga4PropertyId); + + // Assert + assertThat(out).contains("Report result:"); + } +} diff --git a/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSampleTest.java b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSampleTest.java new file mode 100644 index 00000000..00f362a4 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/analytics/RunRealtimeReportWithMultipleMetricsSampleTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.analytics; + +import static com.google.common.truth.Truth.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Tests for the RunRealtimeReportWithMultipleMetrics sample. */ +@RunWith(JUnit4.class) +public class RunRealtimeReportWithMultipleMetricsSampleTest { + + private String ga4PropertyId = + System.getProperty("analyticsdata.quickstart.ga4PropertyId", "222596558"); + + private String runSample(String ga4PropertyId) throws Exception { + PrintStream stdOut = System.out; + ByteArrayOutputStream bout = new ByteArrayOutputStream(); + PrintStream out = new PrintStream(bout); + System.setOut(out); + + // Run the test using default system credentials. + RunRealtimeReportWithMultipleMetricsSample.sampleRunRealtimeReportWithMultipleMetrics( + ga4PropertyId); + System.setOut(stdOut); + return bout.toString(); + } + + @Test + public void testRunRealtimeReportWithMultipleMetrics() throws Exception { + // Act + String out = runSample(ga4PropertyId); + + // Assert + assertThat(out).contains("Report result:"); + } +} From bd4c79542e0ce9c63b5b10a7f58bd8b94276ffbc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:10:27 +0200 Subject: [PATCH 05/12] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#504) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-analytics-data). --- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index bef01bc8..32d4179d 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index bc92f84c..ff7b0308 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From 55e8a1ba582c05dae2eb8c8e0880cfb780fe9268 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jun 2022 18:56:37 +0200 Subject: [PATCH 06/12] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.0 (#506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.4.0` -> `1.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.5.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​150-httpsgithubcomgoogleapisjava-shared-configcomparev140v150-2022-06-10) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.4.0...v1.5.0) ##### Features - add build scripts for native image testing in Java 17 ([#​1440](https://togithub.com/googleapis/java-shared-config/issues/1440)) ([#​475](https://togithub.com/googleapis/java-shared-config/issues/475)) ([e4dfc1b](https://togithub.com/googleapis/java-shared-config/commit/e4dfc1ba29295158c78c8fcf94467d2a6a33538a)) - to produce Java 8 compatible bytecode when using JDK 9+ ([2468276](https://togithub.com/googleapis/java-shared-config/commit/2468276145cdfe1ca911b52f765e026e77661a09)) ##### Dependencies - update surefire.version to v3.0.0-m7 ([bbfe663](https://togithub.com/googleapis/java-shared-config/commit/bbfe66393af3e49612c9c1e4334ba39c133ea1d0))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-analytics-data). --- google-analytics-data-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-analytics-data-bom/pom.xml b/google-analytics-data-bom/pom.xml index 05dc3066..5eda5b70 100644 --- a/google-analytics-data-bom/pom.xml +++ b/google-analytics-data-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 Google Analytics Data BOM diff --git a/pom.xml b/pom.xml index 6ca29fb6..719e36db 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 From c864df4d54144195c83948ff695c6c8b671f5807 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 17:52:28 +0000 Subject: [PATCH 07/12] fix!: rename the type `FunnelFilter` to `FunnelFieldFilter` (#505) - [ ] Regenerate this pull request now. fix!: rename the `funnel_filter` field of the `FunnelFilterExpression` type to `funnel_field_filter` PiperOrigin-RevId: 455204231 Source-Link: https://github.com/googleapis/googleapis/commit/48494807478bb592357bd4d115c13a0224020450 Source-Link: https://github.com/googleapis/googleapis-gen/commit/589642d0a68a2c519273cf0f7d7947b19cd99eac Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTg5NjQyZDBhNjhhMmM1MTkyNzNjZjBmN2Q3OTQ3YjE5Y2Q5OWVhYyJ9 chore: update gapic-generator-java PiperOrigin-RevId: 454939894 Source-Link: https://github.com/googleapis/googleapis/commit/519ca445965b3f94f9e32ae511c154488d2054e9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fc639d21a7cbc30aa0a9b862586942a0fb46c5c8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmM2MzlkMjFhN2NiYzMwYWEwYTliODYyNTg2OTQyYTBmYjQ2YzVjOCJ9 feat: Add Java REST transport to analytics, servicecontrol, servicemanagement, serviceusage and langauge APIs PiperOrigin-RevId: 454254635 Source-Link: https://github.com/googleapis/googleapis/commit/84fb82208e15c45d1732b5eeba7f70828935b97b Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ffb61264d6fb634c430829dd2da75c5bed08304 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGZmYjYxMjY0ZDZmYjYzNGM0MzA4MjlkZDJkYTc1YzViZWQwODMwNCJ9 --- google-analytics-data/pom.xml | 16 + .../v1alpha/AlphaAnalyticsDataClient.java | 15 + .../v1alpha/AlphaAnalyticsDataSettings.java | 23 +- .../stub/AlphaAnalyticsDataStubSettings.java | 53 +- ...JsonAlphaAnalyticsDataCallableFactory.java | 105 ++++ .../stub/HttpJsonAlphaAnalyticsDataStub.java | 198 ++++++ .../data/v1beta/BetaAnalyticsDataClient.java | 15 + .../v1beta/BetaAnalyticsDataSettings.java | 23 +- .../stub/BetaAnalyticsDataStubSettings.java | 53 +- ...pJsonBetaAnalyticsDataCallableFactory.java | 105 ++++ .../stub/HttpJsonBetaAnalyticsDataStub.java | 532 ++++++++++++++++ .../AlphaAnalyticsDataClientHttpJsonTest.java | 143 +++++ .../BetaAnalyticsDataClientHttpJsonTest.java | 571 ++++++++++++++++++ ...nnelFilter.java => FunnelFieldFilter.java} | 132 ++-- ...r.java => FunnelFieldFilterOrBuilder.java} | 6 +- .../data/v1alpha/FunnelFilterExpression.java | 202 ++++--- .../FunnelFilterExpressionOrBuilder.java | 22 +- .../data/v1alpha/FunnelNextAction.java | 48 +- .../v1alpha/FunnelNextActionOrBuilder.java | 12 +- .../data/v1alpha/ReportingApiProto.java | 176 +++--- .../data/v1alpha/RunFunnelReportRequest.java | 48 +- .../RunFunnelReportRequestOrBuilder.java | 12 +- .../data/v1alpha/analytics_data_api.proto | 5 +- .../google/analytics/data/v1alpha/data.proto | 11 +- 24 files changed, 2219 insertions(+), 307 deletions(-) create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataCallableFactory.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataCallableFactory.java create mode 100644 google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataStub.java create mode 100644 google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java create mode 100644 google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientHttpJsonTest.java rename proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/{FunnelFilter.java => FunnelFieldFilter.java} (93%) rename proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/{FunnelFilterOrBuilder.java => FunnelFieldFilterOrBuilder.java} (96%) diff --git a/google-analytics-data/pom.xml b/google-analytics-data/pom.xml index 1c51b291..fbe83db3 100644 --- a/google-analytics-data/pom.xml +++ b/google-analytics-data/pom.xml @@ -62,6 +62,10 @@ com.google.api gax-grpc
+ + com.google.api + gax-httpjson + org.threeten threetenbp @@ -86,12 +90,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test +
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 908ec2a1..4962c6b9 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 @@ -103,6 +103,21 @@ * AlphaAnalyticsDataClient.create(alphaAnalyticsDataSettings); * } * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AlphaAnalyticsDataSettings alphaAnalyticsDataSettings =
+ *     AlphaAnalyticsDataSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             AlphaAnalyticsDataSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * AlphaAnalyticsDataClient alphaAnalyticsDataClient =
+ *     AlphaAnalyticsDataClient.create(alphaAnalyticsDataSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi 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 12452b95..d5e7182c 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 @@ -22,6 +22,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -101,11 +102,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return AlphaAnalyticsDataStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return AlphaAnalyticsDataStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AlphaAnalyticsDataStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return AlphaAnalyticsDataStubSettings.defaultTransportChannelProvider(); } @@ -115,11 +123,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return AlphaAnalyticsDataStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -157,6 +171,11 @@ private static Builder createDefault() { return new Builder(AlphaAnalyticsDataStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(AlphaAnalyticsDataStubSettings.newHttpJsonBuilder()); + } + public AlphaAnalyticsDataStubSettings.Builder getStubSettingsBuilder() { return ((AlphaAnalyticsDataStubSettings.Builder) getStubSettings()); } 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 62618585..a775cee5 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 @@ -26,6 +26,9 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -102,6 +105,11 @@ public AlphaAnalyticsDataStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcAlphaAnalyticsDataStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAlphaAnalyticsDataStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -134,18 +142,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(AlphaAnalyticsDataStubSettings.class)) @@ -153,11 +168,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AlphaAnalyticsDataStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AlphaAnalyticsDataStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -243,6 +277,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .runFunnelReportSettings() diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataCallableFactory.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataCallableFactory.java new file mode 100644 index 00000000..0d45a48a --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1alpha.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AlphaAnalyticsData service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAlphaAnalyticsDataCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java new file mode 100644 index 00000000..3de65b61 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1alpha/stub/HttpJsonAlphaAnalyticsDataStub.java @@ -0,0 +1,198 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1alpha.stub; + +import com.google.analytics.data.v1alpha.RunFunnelReportRequest; +import com.google.analytics.data.v1alpha.RunFunnelReportResponse; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AlphaAnalyticsData service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAlphaAnalyticsDataStub extends AlphaAnalyticsDataStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + runFunnelReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1alpha.AlphaAnalyticsData/RunFunnelReport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1alpha/{property=properties/*}:runFunnelReport", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RunFunnelReportResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + runFunnelReportCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAlphaAnalyticsDataStub create(AlphaAnalyticsDataStubSettings settings) + throws IOException { + return new HttpJsonAlphaAnalyticsDataStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAlphaAnalyticsDataStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAlphaAnalyticsDataStub( + AlphaAnalyticsDataStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAlphaAnalyticsDataStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAlphaAnalyticsDataStub( + AlphaAnalyticsDataStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonAlphaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonAlphaAnalyticsDataStub( + AlphaAnalyticsDataStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAlphaAnalyticsDataCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAlphaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonAlphaAnalyticsDataStub( + AlphaAnalyticsDataStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + runFunnelReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(runFunnelReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.runFunnelReportCallable = + callableFactory.createUnaryCallable( + runFunnelReportTransportSettings, settings.runFunnelReportSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(runFunnelReportMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable runFunnelReportCallable() { + return runFunnelReportCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java index 5448f0d1..5f9178fc 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClient.java @@ -108,6 +108,21 @@ * BetaAnalyticsDataClient.create(betaAnalyticsDataSettings); * } * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * BetaAnalyticsDataSettings betaAnalyticsDataSettings =
+ *     BetaAnalyticsDataSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             BetaAnalyticsDataSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * BetaAnalyticsDataClient betaAnalyticsDataClient =
+ *     BetaAnalyticsDataClient.create(betaAnalyticsDataSettings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java index bc1d0cee..f23e6db9 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/BetaAnalyticsDataSettings.java @@ -22,6 +22,7 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -133,11 +134,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return BetaAnalyticsDataStubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return BetaAnalyticsDataStubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return BetaAnalyticsDataStubSettings.defaultTransportChannelProvider(); } @@ -147,11 +155,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return BetaAnalyticsDataStubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -189,6 +203,11 @@ private static Builder createDefault() { return new Builder(BetaAnalyticsDataStubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(BetaAnalyticsDataStubSettings.newHttpJsonBuilder()); + } + public BetaAnalyticsDataStubSettings.Builder getStubSettingsBuilder() { return ((BetaAnalyticsDataStubSettings.Builder) getStubSettings()); } diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java index 55706fd6..42182f46 100644 --- a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/BetaAnalyticsDataStubSettings.java @@ -38,6 +38,9 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -157,6 +160,11 @@ public BetaAnalyticsDataStub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcBetaAnalyticsDataStub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBetaAnalyticsDataStub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -189,18 +197,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(BetaAnalyticsDataStubSettings.class)) @@ -208,11 +223,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BetaAnalyticsDataStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BetaAnalyticsDataStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -354,6 +388,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .runReportSettings() diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataCallableFactory.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataCallableFactory.java new file mode 100644 index 00000000..e5094846 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BetaAnalyticsData service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBetaAnalyticsDataCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataStub.java b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataStub.java new file mode 100644 index 00000000..3f13d461 --- /dev/null +++ b/google-analytics-data/src/main/java/com/google/analytics/data/v1beta/stub/HttpJsonBetaAnalyticsDataStub.java @@ -0,0 +1,532 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1beta.stub; + +import com.google.analytics.data.v1beta.BatchRunPivotReportsRequest; +import com.google.analytics.data.v1beta.BatchRunPivotReportsResponse; +import com.google.analytics.data.v1beta.BatchRunReportsRequest; +import com.google.analytics.data.v1beta.BatchRunReportsResponse; +import com.google.analytics.data.v1beta.CheckCompatibilityRequest; +import com.google.analytics.data.v1beta.CheckCompatibilityResponse; +import com.google.analytics.data.v1beta.GetMetadataRequest; +import com.google.analytics.data.v1beta.Metadata; +import com.google.analytics.data.v1beta.RunPivotReportRequest; +import com.google.analytics.data.v1beta.RunPivotReportResponse; +import com.google.analytics.data.v1beta.RunRealtimeReportRequest; +import com.google.analytics.data.v1beta.RunRealtimeReportResponse; +import com.google.analytics.data.v1beta.RunReportRequest; +import com.google.analytics.data.v1beta.RunReportResponse; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BetaAnalyticsData service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBetaAnalyticsDataStub extends BetaAnalyticsDataStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + runReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunReport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:runReport", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RunReportResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + runPivotReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunPivotReport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:runPivotReport", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RunPivotReportResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchRunReportsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/BatchRunReports") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:batchRunReports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchRunReportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + BatchRunPivotReportsRequest, BatchRunPivotReportsResponse> + batchRunPivotReportsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.analytics.data.v1beta.BetaAnalyticsData/BatchRunPivotReports") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:batchRunPivotReports", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchRunPivotReportsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getMetadataMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/GetMetadata") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=properties/*/metadata}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Metadata.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + runRealtimeReportMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.analytics.data.v1beta.BetaAnalyticsData/RunRealtimeReport") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:runRealtimeReport", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RunRealtimeReportResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + checkCompatibilityMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.analytics.data.v1beta.BetaAnalyticsData/CheckCompatibility") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{property=properties/*}:checkCompatibility", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "property", request.getProperty()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearProperty().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CheckCompatibilityResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable runReportCallable; + private final UnaryCallable runPivotReportCallable; + private final UnaryCallable + batchRunReportsCallable; + private final UnaryCallable + batchRunPivotReportsCallable; + private final UnaryCallable getMetadataCallable; + private final UnaryCallable + runRealtimeReportCallable; + private final UnaryCallable + checkCompatibilityCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBetaAnalyticsDataStub create(BetaAnalyticsDataStubSettings settings) + throws IOException { + return new HttpJsonBetaAnalyticsDataStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBetaAnalyticsDataStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBetaAnalyticsDataStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonBetaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonBetaAnalyticsDataCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBetaAnalyticsDataStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonBetaAnalyticsDataStub( + BetaAnalyticsDataStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings runReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(runReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + runPivotReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(runPivotReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchRunReportsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchRunReportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + batchRunPivotReportsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(batchRunPivotReportsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getMetadataTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getMetadataMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + runRealtimeReportTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(runRealtimeReportMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + checkCompatibilityTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(checkCompatibilityMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.runReportCallable = + callableFactory.createUnaryCallable( + runReportTransportSettings, settings.runReportSettings(), clientContext); + this.runPivotReportCallable = + callableFactory.createUnaryCallable( + runPivotReportTransportSettings, settings.runPivotReportSettings(), clientContext); + this.batchRunReportsCallable = + callableFactory.createUnaryCallable( + batchRunReportsTransportSettings, settings.batchRunReportsSettings(), clientContext); + this.batchRunPivotReportsCallable = + callableFactory.createUnaryCallable( + batchRunPivotReportsTransportSettings, + settings.batchRunPivotReportsSettings(), + clientContext); + this.getMetadataCallable = + callableFactory.createUnaryCallable( + getMetadataTransportSettings, settings.getMetadataSettings(), clientContext); + this.runRealtimeReportCallable = + callableFactory.createUnaryCallable( + runRealtimeReportTransportSettings, + settings.runRealtimeReportSettings(), + clientContext); + this.checkCompatibilityCallable = + callableFactory.createUnaryCallable( + checkCompatibilityTransportSettings, + settings.checkCompatibilitySettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(runReportMethodDescriptor); + methodDescriptors.add(runPivotReportMethodDescriptor); + methodDescriptors.add(batchRunReportsMethodDescriptor); + methodDescriptors.add(batchRunPivotReportsMethodDescriptor); + methodDescriptors.add(getMetadataMethodDescriptor); + methodDescriptors.add(runRealtimeReportMethodDescriptor); + methodDescriptors.add(checkCompatibilityMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable runReportCallable() { + return runReportCallable; + } + + @Override + public UnaryCallable runPivotReportCallable() { + return runPivotReportCallable; + } + + @Override + public UnaryCallable batchRunReportsCallable() { + return batchRunReportsCallable; + } + + @Override + public UnaryCallable + batchRunPivotReportsCallable() { + return batchRunPivotReportsCallable; + } + + @Override + public UnaryCallable getMetadataCallable() { + return getMetadataCallable; + } + + @Override + public UnaryCallable + runRealtimeReportCallable() { + return runRealtimeReportCallable; + } + + @Override + public UnaryCallable + checkCompatibilityCallable() { + return checkCompatibilityCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java new file mode 100644 index 00000000..b2d7572d --- /dev/null +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1alpha/AlphaAnalyticsDataClientHttpJsonTest.java @@ -0,0 +1,143 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1alpha; + +import com.google.analytics.data.v1alpha.stub.HttpJsonAlphaAnalyticsDataStub; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AlphaAnalyticsDataClientHttpJsonTest { + private static MockHttpService mockService; + private static AlphaAnalyticsDataClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAlphaAnalyticsDataStub.getMethodDescriptors(), + AlphaAnalyticsDataSettings.getDefaultEndpoint()); + AlphaAnalyticsDataSettings settings = + AlphaAnalyticsDataSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AlphaAnalyticsDataSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AlphaAnalyticsDataClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void runFunnelReportTest() throws Exception { + RunFunnelReportResponse expectedResponse = + RunFunnelReportResponse.newBuilder() + .setFunnelTable(FunnelSubReport.newBuilder().build()) + .setFunnelVisualization(FunnelSubReport.newBuilder().build()) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + RunFunnelReportRequest request = + RunFunnelReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDateRanges(new ArrayList()) + .setFunnel(Funnel.newBuilder().build()) + .setFunnelBreakdown(FunnelBreakdown.newBuilder().build()) + .setFunnelNextAction(FunnelNextAction.newBuilder().build()) + .addAllSegments(new ArrayList()) + .setLimit(102976443) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setReturnPropertyQuota(true) + .build(); + + RunFunnelReportResponse actualResponse = client.runFunnelReport(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runFunnelReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunFunnelReportRequest request = + RunFunnelReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDateRanges(new ArrayList()) + .setFunnel(Funnel.newBuilder().build()) + .setFunnelBreakdown(FunnelBreakdown.newBuilder().build()) + .setFunnelNextAction(FunnelNextAction.newBuilder().build()) + .addAllSegments(new ArrayList()) + .setLimit(102976443) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setReturnPropertyQuota(true) + .build(); + client.runFunnelReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientHttpJsonTest.java b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientHttpJsonTest.java new file mode 100644 index 00000000..0d070d5c --- /dev/null +++ b/google-analytics-data/src/test/java/com/google/analytics/data/v1beta/BetaAnalyticsDataClientHttpJsonTest.java @@ -0,0 +1,571 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.data.v1beta; + +import com.google.analytics.data.v1beta.stub.HttpJsonBetaAnalyticsDataStub; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class BetaAnalyticsDataClientHttpJsonTest { + private static MockHttpService mockService; + private static BetaAnalyticsDataClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBetaAnalyticsDataStub.getMethodDescriptors(), + BetaAnalyticsDataSettings.getDefaultEndpoint()); + BetaAnalyticsDataSettings settings = + BetaAnalyticsDataSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + BetaAnalyticsDataSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BetaAnalyticsDataClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void runReportTest() throws Exception { + RunReportResponse expectedResponse = + 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()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + RunReportRequest request = + RunReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .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 = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunReportRequest request = + RunReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setOffset(-1019779949) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + client.runReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runPivotReportTest() throws Exception { + RunPivotReportResponse expectedResponse = + RunPivotReportResponse.newBuilder() + .addAllPivotHeaders(new ArrayList()) + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllAggregates(new ArrayList()) + .setMetadata(ResponseMetaData.newBuilder().build()) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .addAllPivots(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + + RunPivotReportResponse actualResponse = client.runPivotReport(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runPivotReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunPivotReportRequest request = + RunPivotReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllDateRanges(new ArrayList()) + .addAllPivots(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCurrencyCode("currencyCode1004773790") + .setCohortSpec(CohortSpec.newBuilder().build()) + .setKeepEmptyRows(true) + .setReturnPropertyQuota(true) + .build(); + client.runPivotReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchRunReportsTest() throws Exception { + BatchRunReportsResponse expectedResponse = + BatchRunReportsResponse.newBuilder() + .addAllReports(new ArrayList()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllRequests(new ArrayList()) + .build(); + + BatchRunReportsResponse actualResponse = client.batchRunReports(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchRunReportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchRunReportsRequest request = + BatchRunReportsRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllRequests(new ArrayList()) + .build(); + client.batchRunReports(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchRunPivotReportsTest() throws Exception { + BatchRunPivotReportsResponse expectedResponse = + BatchRunPivotReportsResponse.newBuilder() + .addAllPivotReports(new ArrayList()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllRequests(new ArrayList()) + .build(); + + BatchRunPivotReportsResponse actualResponse = client.batchRunPivotReports(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchRunPivotReportsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchRunPivotReportsRequest request = + BatchRunPivotReportsRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllRequests(new ArrayList()) + .build(); + client.batchRunPivotReports(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getMetadataTest() throws Exception { + Metadata expectedResponse = + Metadata.newBuilder() + .setName(MetadataName.of("[PROPERTY]").toString()) + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + MetadataName name = MetadataName.of("[PROPERTY]"); + + Metadata actualResponse = client.getMetadata(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.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(); + mockService.addResponse(expectedResponse); + + String name = "properties/propertie-8635/metadata"; + + Metadata actualResponse = client.getMetadata(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getMetadataExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "properties/propertie-8635/metadata"; + client.getMetadata(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runRealtimeReportTest() throws Exception { + RunRealtimeReportResponse expectedResponse = + RunRealtimeReportResponse.newBuilder() + .addAllDimensionHeaders(new ArrayList()) + .addAllMetricHeaders(new ArrayList()) + .addAllRows(new ArrayList()) + .addAllTotals(new ArrayList()) + .addAllMaximums(new ArrayList()) + .addAllMinimums(new ArrayList()) + .setRowCount(1340416618) + .setPropertyQuota(PropertyQuota.newBuilder().build()) + .setKind("kind3292052") + .build(); + mockService.addResponse(expectedResponse); + + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .addAllMinuteRanges(new ArrayList()) + .build(); + + RunRealtimeReportResponse actualResponse = client.runRealtimeReport(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void runRealtimeReportExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RunRealtimeReportRequest request = + RunRealtimeReportRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setLimit(102976443) + .addAllMetricAggregations(new ArrayList()) + .addAllOrderBys(new ArrayList()) + .setReturnPropertyQuota(true) + .addAllMinuteRanges(new ArrayList()) + .build(); + client.runRealtimeReport(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkCompatibilityTest() throws Exception { + CheckCompatibilityResponse expectedResponse = + CheckCompatibilityResponse.newBuilder() + .addAllDimensionCompatibilities(new ArrayList()) + .addAllMetricCompatibilities(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CheckCompatibilityRequest request = + CheckCompatibilityRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCompatibilityFilter(Compatibility.forNumber(0)) + .build(); + + CheckCompatibilityResponse actualResponse = client.checkCompatibility(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void checkCompatibilityExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CheckCompatibilityRequest request = + CheckCompatibilityRequest.newBuilder() + .setProperty("properties/propertie-2179") + .addAllDimensions(new ArrayList()) + .addAllMetrics(new ArrayList()) + .setDimensionFilter(FilterExpression.newBuilder().build()) + .setMetricFilter(FilterExpression.newBuilder().build()) + .setCompatibilityFilter(Compatibility.forNumber(0)) + .build(); + client.checkCompatibility(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilter.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilter.java similarity index 93% rename from proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilter.java rename to proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilter.java index a5a228dd..a613e147 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilter.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilter.java @@ -25,26 +25,26 @@ * An expression to filter dimension or metric values. * * - * Protobuf type {@code google.analytics.data.v1alpha.FunnelFilter} + * Protobuf type {@code google.analytics.data.v1alpha.FunnelFieldFilter} */ -public final class FunnelFilter extends com.google.protobuf.GeneratedMessageV3 +public final class FunnelFieldFilter extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.FunnelFilter) - FunnelFilterOrBuilder { + // @@protoc_insertion_point(message_implements:google.analytics.data.v1alpha.FunnelFieldFilter) + FunnelFieldFilterOrBuilder { private static final long serialVersionUID = 0L; - // Use FunnelFilter.newBuilder() to construct. - private FunnelFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use FunnelFieldFilter.newBuilder() to construct. + private FunnelFieldFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private FunnelFilter() { + private FunnelFieldFilter() { fieldName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new FunnelFilter(); + return new FunnelFieldFilter(); } @java.lang.Override @@ -52,7 +52,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FunnelFilter( + private FunnelFieldFilter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -168,17 +168,17 @@ private FunnelFilter( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.ReportingApiProto - .internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor; + .internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.ReportingApiProto - .internal_static_google_analytics_data_v1alpha_FunnelFilter_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.FunnelFilter.class, - com.google.analytics.data.v1alpha.FunnelFilter.Builder.class); + com.google.analytics.data.v1alpha.FunnelFieldFilter.class, + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder.class); } private int oneFilterCase_ = 0; @@ -558,11 +558,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.analytics.data.v1alpha.FunnelFilter)) { + if (!(obj instanceof com.google.analytics.data.v1alpha.FunnelFieldFilter)) { return super.equals(obj); } - com.google.analytics.data.v1alpha.FunnelFilter other = - (com.google.analytics.data.v1alpha.FunnelFilter) obj; + com.google.analytics.data.v1alpha.FunnelFieldFilter other = + (com.google.analytics.data.v1alpha.FunnelFieldFilter) obj; if (!getFieldName().equals(other.getFieldName())) return false; if (!getOneFilterCase().equals(other.getOneFilterCase())) return false; @@ -620,71 +620,71 @@ public int hashCode() { return hash; } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom(byte[] data) + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom(java.io.InputStream input) - throws java.io.IOException { + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseDelimitedFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.analytics.data.v1alpha.FunnelFilter parseFrom( + public static com.google.analytics.data.v1alpha.FunnelFieldFilter parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -701,7 +701,7 @@ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.analytics.data.v1alpha.FunnelFilter prototype) { + public static Builder newBuilder(com.google.analytics.data.v1alpha.FunnelFieldFilter prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -722,28 +722,28 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * An expression to filter dimension or metric values. * * - * Protobuf type {@code google.analytics.data.v1alpha.FunnelFilter} + * Protobuf type {@code google.analytics.data.v1alpha.FunnelFieldFilter} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.FunnelFilter) - com.google.analytics.data.v1alpha.FunnelFilterOrBuilder { + // @@protoc_insertion_point(builder_implements:google.analytics.data.v1alpha.FunnelFieldFilter) + com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.analytics.data.v1alpha.ReportingApiProto - .internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor; + .internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.analytics.data.v1alpha.ReportingApiProto - .internal_static_google_analytics_data_v1alpha_FunnelFilter_fieldAccessorTable + .internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.analytics.data.v1alpha.FunnelFilter.class, - com.google.analytics.data.v1alpha.FunnelFilter.Builder.class); + com.google.analytics.data.v1alpha.FunnelFieldFilter.class, + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder.class); } - // Construct using com.google.analytics.data.v1alpha.FunnelFilter.newBuilder() + // Construct using com.google.analytics.data.v1alpha.FunnelFieldFilter.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -770,17 +770,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.analytics.data.v1alpha.ReportingApiProto - .internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor; + .internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor; } @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter getDefaultInstanceForType() { - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + public com.google.analytics.data.v1alpha.FunnelFieldFilter getDefaultInstanceForType() { + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter build() { - com.google.analytics.data.v1alpha.FunnelFilter result = buildPartial(); + public com.google.analytics.data.v1alpha.FunnelFieldFilter build() { + com.google.analytics.data.v1alpha.FunnelFieldFilter result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -788,9 +788,9 @@ public com.google.analytics.data.v1alpha.FunnelFilter build() { } @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter buildPartial() { - com.google.analytics.data.v1alpha.FunnelFilter result = - new com.google.analytics.data.v1alpha.FunnelFilter(this); + public com.google.analytics.data.v1alpha.FunnelFieldFilter buildPartial() { + com.google.analytics.data.v1alpha.FunnelFieldFilter result = + new com.google.analytics.data.v1alpha.FunnelFieldFilter(this); result.fieldName_ = fieldName_; if (oneFilterCase_ == 4) { if (stringFilterBuilder_ == null) { @@ -860,16 +860,17 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.analytics.data.v1alpha.FunnelFilter) { - return mergeFrom((com.google.analytics.data.v1alpha.FunnelFilter) other); + if (other instanceof com.google.analytics.data.v1alpha.FunnelFieldFilter) { + return mergeFrom((com.google.analytics.data.v1alpha.FunnelFieldFilter) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.analytics.data.v1alpha.FunnelFilter other) { - if (other == com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance()) return this; + public Builder mergeFrom(com.google.analytics.data.v1alpha.FunnelFieldFilter other) { + if (other == com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance()) + return this; if (!other.getFieldName().isEmpty()) { fieldName_ = other.fieldName_; onChanged(); @@ -915,11 +916,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.analytics.data.v1alpha.FunnelFilter parsedMessage = null; + com.google.analytics.data.v1alpha.FunnelFieldFilter parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.analytics.data.v1alpha.FunnelFilter) e.getUnfinishedMessage(); + parsedMessage = + (com.google.analytics.data.v1alpha.FunnelFieldFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -1900,42 +1902,42 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.FunnelFilter) + // @@protoc_insertion_point(builder_scope:google.analytics.data.v1alpha.FunnelFieldFilter) } - // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.FunnelFilter) - private static final com.google.analytics.data.v1alpha.FunnelFilter DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.analytics.data.v1alpha.FunnelFieldFilter) + private static final com.google.analytics.data.v1alpha.FunnelFieldFilter DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.FunnelFilter(); + DEFAULT_INSTANCE = new com.google.analytics.data.v1alpha.FunnelFieldFilter(); } - public static com.google.analytics.data.v1alpha.FunnelFilter getDefaultInstance() { + public static com.google.analytics.data.v1alpha.FunnelFieldFilter getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public FunnelFilter parsePartialFrom( + public FunnelFieldFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FunnelFilter(input, extensionRegistry); + return new FunnelFieldFilter(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter getDefaultInstanceForType() { + public com.google.analytics.data.v1alpha.FunnelFieldFilter getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilterOrBuilder.java similarity index 96% rename from proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterOrBuilder.java rename to proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilterOrBuilder.java index 003dbe0c..5c105956 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFieldFilterOrBuilder.java @@ -18,9 +18,9 @@ package com.google.analytics.data.v1alpha; -public interface FunnelFilterOrBuilder +public interface FunnelFieldFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.FunnelFilter) + // @@protoc_insertion_point(interface_extends:google.analytics.data.v1alpha.FunnelFieldFilter) com.google.protobuf.MessageOrBuilder { /** @@ -188,5 +188,5 @@ public interface FunnelFilterOrBuilder */ com.google.analytics.data.v1alpha.BetweenFilterOrBuilder getBetweenFilterOrBuilder(); - public com.google.analytics.data.v1alpha.FunnelFilter.OneFilterCase getOneFilterCase(); + public com.google.analytics.data.v1alpha.FunnelFieldFilter.OneFilterCase getOneFilterCase(); } diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpression.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpression.java index db112542..ec95a99a 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpression.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpression.java @@ -131,15 +131,17 @@ private FunnelFilterExpression( } case 34: { - com.google.analytics.data.v1alpha.FunnelFilter.Builder subBuilder = null; + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder subBuilder = null; if (exprCase_ == 4) { - subBuilder = ((com.google.analytics.data.v1alpha.FunnelFilter) expr_).toBuilder(); + subBuilder = + ((com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_).toBuilder(); } expr_ = input.readMessage( - com.google.analytics.data.v1alpha.FunnelFilter.parser(), extensionRegistry); + com.google.analytics.data.v1alpha.FunnelFieldFilter.parser(), + extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((com.google.analytics.data.v1alpha.FunnelFilter) expr_); + subBuilder.mergeFrom((com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_); expr_ = subBuilder.buildPartial(); } exprCase_ = 4; @@ -209,7 +211,7 @@ public enum ExprCase AND_GROUP(1), OR_GROUP(2), NOT_EXPRESSION(3), - FUNNEL_FILTER(4), + FUNNEL_FIELD_FILTER(4), FUNNEL_EVENT_FILTER(5), EXPR_NOT_SET(0); private final int value; @@ -236,7 +238,7 @@ public static ExprCase forNumber(int value) { case 3: return NOT_EXPRESSION; case 4: - return FUNNEL_FILTER; + return FUNNEL_FIELD_FILTER; case 5: return FUNNEL_EVENT_FILTER; case 0: @@ -411,55 +413,56 @@ public com.google.analytics.data.v1alpha.FunnelFilterExpression getNotExpression return com.google.analytics.data.v1alpha.FunnelFilterExpression.getDefaultInstance(); } - public static final int FUNNEL_FILTER_FIELD_NUMBER = 4; + public static final int FUNNEL_FIELD_FILTER_FIELD_NUMBER = 4; /** * * *

-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return Whether the funnelFilter field is set. + * @return Whether the funnelFieldFilter field is set. */ @java.lang.Override - public boolean hasFunnelFilter() { + public boolean hasFunnelFieldFilter() { return exprCase_ == 4; } /** * * *
-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return The funnelFilter. + * @return The funnelFieldFilter. */ @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter getFunnelFilter() { + public com.google.analytics.data.v1alpha.FunnelFieldFilter getFunnelFieldFilter() { if (exprCase_ == 4) { - return (com.google.analytics.data.v1alpha.FunnelFilter) expr_; + return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_; } - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } /** * * *
-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilterOrBuilder getFunnelFilterOrBuilder() { + public com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder + getFunnelFieldFilterOrBuilder() { if (exprCase_ == 4) { - return (com.google.analytics.data.v1alpha.FunnelFilter) expr_; + return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_; } - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } public static final int FUNNEL_EVENT_FILTER_FIELD_NUMBER = 5; @@ -547,7 +550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(3, (com.google.analytics.data.v1alpha.FunnelFilterExpression) expr_); } if (exprCase_ == 4) { - output.writeMessage(4, (com.google.analytics.data.v1alpha.FunnelFilter) expr_); + output.writeMessage(4, (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_); } if (exprCase_ == 5) { output.writeMessage(5, (com.google.analytics.data.v1alpha.FunnelEventFilter) expr_); @@ -579,7 +582,7 @@ public int getSerializedSize() { if (exprCase_ == 4) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.analytics.data.v1alpha.FunnelFilter) expr_); + 4, (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_); } if (exprCase_ == 5) { size += @@ -614,7 +617,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNotExpression().equals(other.getNotExpression())) return false; break; case 4: - if (!getFunnelFilter().equals(other.getFunnelFilter())) return false; + if (!getFunnelFieldFilter().equals(other.getFunnelFieldFilter())) return false; break; case 5: if (!getFunnelEventFilter().equals(other.getFunnelEventFilter())) return false; @@ -647,8 +650,8 @@ public int hashCode() { hash = (53 * hash) + getNotExpression().hashCode(); break; case 4: - hash = (37 * hash) + FUNNEL_FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFunnelFilter().hashCode(); + hash = (37 * hash) + FUNNEL_FIELD_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFunnelFieldFilter().hashCode(); break; case 5: hash = (37 * hash) + FUNNEL_EVENT_FILTER_FIELD_NUMBER; @@ -854,10 +857,10 @@ public com.google.analytics.data.v1alpha.FunnelFilterExpression buildPartial() { } } if (exprCase_ == 4) { - if (funnelFilterBuilder_ == null) { + if (funnelFieldFilterBuilder_ == null) { result.expr_ = expr_; } else { - result.expr_ = funnelFilterBuilder_.build(); + result.expr_ = funnelFieldFilterBuilder_.build(); } } if (exprCase_ == 5) { @@ -934,9 +937,9 @@ public Builder mergeFrom(com.google.analytics.data.v1alpha.FunnelFilterExpressio mergeNotExpression(other.getNotExpression()); break; } - case FUNNEL_FILTER: + case FUNNEL_FIELD_FILTER: { - mergeFunnelFilter(other.getFunnelFilter()); + mergeFunnelFieldFilter(other.getFunnelFieldFilter()); break; } case FUNNEL_EVENT_FILTER: @@ -1639,68 +1642,68 @@ public Builder clearNotExpression() { } private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.data.v1alpha.FunnelFilter, - com.google.analytics.data.v1alpha.FunnelFilter.Builder, - com.google.analytics.data.v1alpha.FunnelFilterOrBuilder> - funnelFilterBuilder_; + com.google.analytics.data.v1alpha.FunnelFieldFilter, + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder, + com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder> + funnelFieldFilterBuilder_; /** * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return Whether the funnelFilter field is set. + * @return Whether the funnelFieldFilter field is set. */ @java.lang.Override - public boolean hasFunnelFilter() { + public boolean hasFunnelFieldFilter() { return exprCase_ == 4; } /** * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return The funnelFilter. + * @return The funnelFieldFilter. */ @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilter getFunnelFilter() { - if (funnelFilterBuilder_ == null) { + public com.google.analytics.data.v1alpha.FunnelFieldFilter getFunnelFieldFilter() { + if (funnelFieldFilterBuilder_ == null) { if (exprCase_ == 4) { - return (com.google.analytics.data.v1alpha.FunnelFilter) expr_; + return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_; } - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } else { if (exprCase_ == 4) { - return funnelFilterBuilder_.getMessage(); + return funnelFieldFilterBuilder_.getMessage(); } - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } } /** * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - public Builder setFunnelFilter(com.google.analytics.data.v1alpha.FunnelFilter value) { - if (funnelFilterBuilder_ == null) { + public Builder setFunnelFieldFilter(com.google.analytics.data.v1alpha.FunnelFieldFilter value) { + if (funnelFieldFilterBuilder_ == null) { if (value == null) { throw new NullPointerException(); } expr_ = value; onChanged(); } else { - funnelFilterBuilder_.setMessage(value); + funnelFieldFilterBuilder_.setMessage(value); } exprCase_ = 4; return this; @@ -1709,18 +1712,18 @@ public Builder setFunnelFilter(com.google.analytics.data.v1alpha.FunnelFilter va * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - public Builder setFunnelFilter( - com.google.analytics.data.v1alpha.FunnelFilter.Builder builderForValue) { - if (funnelFilterBuilder_ == null) { + public Builder setFunnelFieldFilter( + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder builderForValue) { + if (funnelFieldFilterBuilder_ == null) { expr_ = builderForValue.build(); onChanged(); } else { - funnelFilterBuilder_.setMessage(builderForValue.build()); + funnelFieldFilterBuilder_.setMessage(builderForValue.build()); } exprCase_ = 4; return this; @@ -1729,18 +1732,19 @@ public Builder setFunnelFilter( * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - public Builder mergeFunnelFilter(com.google.analytics.data.v1alpha.FunnelFilter value) { - if (funnelFilterBuilder_ == null) { + public Builder mergeFunnelFieldFilter( + com.google.analytics.data.v1alpha.FunnelFieldFilter value) { + if (funnelFieldFilterBuilder_ == null) { if (exprCase_ == 4 - && expr_ != com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance()) { + && expr_ != com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance()) { expr_ = - com.google.analytics.data.v1alpha.FunnelFilter.newBuilder( - (com.google.analytics.data.v1alpha.FunnelFilter) expr_) + com.google.analytics.data.v1alpha.FunnelFieldFilter.newBuilder( + (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_) .mergeFrom(value) .buildPartial(); } else { @@ -1749,9 +1753,9 @@ public Builder mergeFunnelFilter(com.google.analytics.data.v1alpha.FunnelFilter onChanged(); } else { if (exprCase_ == 4) { - funnelFilterBuilder_.mergeFrom(value); + funnelFieldFilterBuilder_.mergeFrom(value); } else { - funnelFilterBuilder_.setMessage(value); + funnelFieldFilterBuilder_.setMessage(value); } } exprCase_ = 4; @@ -1761,13 +1765,13 @@ public Builder mergeFunnelFilter(com.google.analytics.data.v1alpha.FunnelFilter * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - public Builder clearFunnelFilter() { - if (funnelFilterBuilder_ == null) { + public Builder clearFunnelFieldFilter() { + if (funnelFieldFilterBuilder_ == null) { if (exprCase_ == 4) { exprCase_ = 0; expr_ = null; @@ -1778,7 +1782,7 @@ public Builder clearFunnelFilter() { exprCase_ = 0; expr_ = null; } - funnelFilterBuilder_.clear(); + funnelFieldFilterBuilder_.clear(); } return this; } @@ -1786,58 +1790,60 @@ public Builder clearFunnelFilter() { * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - public com.google.analytics.data.v1alpha.FunnelFilter.Builder getFunnelFilterBuilder() { - return getFunnelFilterFieldBuilder().getBuilder(); + public com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder + getFunnelFieldFilterBuilder() { + return getFunnelFieldFilterFieldBuilder().getBuilder(); } /** * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ @java.lang.Override - public com.google.analytics.data.v1alpha.FunnelFilterOrBuilder getFunnelFilterOrBuilder() { - if ((exprCase_ == 4) && (funnelFilterBuilder_ != null)) { - return funnelFilterBuilder_.getMessageOrBuilder(); + public com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder + getFunnelFieldFilterOrBuilder() { + if ((exprCase_ == 4) && (funnelFieldFilterBuilder_ != null)) { + return funnelFieldFilterBuilder_.getMessageOrBuilder(); } else { if (exprCase_ == 4) { - return (com.google.analytics.data.v1alpha.FunnelFilter) expr_; + return (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_; } - return com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + return com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } } /** * * *
-     * A primitive funnel filter.
+     * A funnel filter for a dimension or metric.
      * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.data.v1alpha.FunnelFilter, - com.google.analytics.data.v1alpha.FunnelFilter.Builder, - com.google.analytics.data.v1alpha.FunnelFilterOrBuilder> - getFunnelFilterFieldBuilder() { - if (funnelFilterBuilder_ == null) { + com.google.analytics.data.v1alpha.FunnelFieldFilter, + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder, + com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder> + getFunnelFieldFilterFieldBuilder() { + if (funnelFieldFilterBuilder_ == null) { if (!(exprCase_ == 4)) { - expr_ = com.google.analytics.data.v1alpha.FunnelFilter.getDefaultInstance(); + expr_ = com.google.analytics.data.v1alpha.FunnelFieldFilter.getDefaultInstance(); } - funnelFilterBuilder_ = + funnelFieldFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.analytics.data.v1alpha.FunnelFilter, - com.google.analytics.data.v1alpha.FunnelFilter.Builder, - com.google.analytics.data.v1alpha.FunnelFilterOrBuilder>( - (com.google.analytics.data.v1alpha.FunnelFilter) expr_, + com.google.analytics.data.v1alpha.FunnelFieldFilter, + com.google.analytics.data.v1alpha.FunnelFieldFilter.Builder, + com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder>( + (com.google.analytics.data.v1alpha.FunnelFieldFilter) expr_, getParentForChildren(), isClean()); expr_ = null; @@ -1845,7 +1851,7 @@ public com.google.analytics.data.v1alpha.FunnelFilterOrBuilder getFunnelFilterOr exprCase_ = 4; onChanged(); ; - return funnelFilterBuilder_; + return funnelFieldFilterBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpressionOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpressionOrBuilder.java index b731f681..ebf68b15 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpressionOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelFilterExpressionOrBuilder.java @@ -132,36 +132,36 @@ public interface FunnelFilterExpressionOrBuilder * * *
-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return Whether the funnelFilter field is set. + * @return Whether the funnelFieldFilter field is set. */ - boolean hasFunnelFilter(); + boolean hasFunnelFieldFilter(); /** * * *
-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; * - * @return The funnelFilter. + * @return The funnelFieldFilter. */ - com.google.analytics.data.v1alpha.FunnelFilter getFunnelFilter(); + com.google.analytics.data.v1alpha.FunnelFieldFilter getFunnelFieldFilter(); /** * * *
-   * A primitive funnel filter.
+   * A funnel filter for a dimension or metric.
    * 
* - * .google.analytics.data.v1alpha.FunnelFilter funnel_filter = 4; + * .google.analytics.data.v1alpha.FunnelFieldFilter funnel_field_filter = 4; */ - com.google.analytics.data.v1alpha.FunnelFilterOrBuilder getFunnelFilterOrBuilder(); + com.google.analytics.data.v1alpha.FunnelFieldFilterOrBuilder getFunnelFieldFilterOrBuilder(); /** * diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextAction.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextAction.java index 75f16313..25c03ce9 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextAction.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextAction.java @@ -142,7 +142,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -160,7 +162,9 @@ public boolean hasNextActionDimension() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -180,7 +184,9 @@ public com.google.analytics.data.v1alpha.Dimension getNextActionDimension() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -603,7 +609,9 @@ public Builder mergeFrom( * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -620,7 +628,9 @@ public boolean hasNextActionDimension() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -643,7 +653,9 @@ public com.google.analytics.data.v1alpha.Dimension getNextActionDimension() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -668,7 +680,9 @@ public Builder setNextActionDimension(com.google.analytics.data.v1alpha.Dimensio * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -691,7 +705,9 @@ public Builder setNextActionDimension( * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -720,7 +736,9 @@ public Builder mergeNextActionDimension(com.google.analytics.data.v1alpha.Dimens * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -743,7 +761,9 @@ public Builder clearNextActionDimension() { * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -760,7 +780,9 @@ public com.google.analytics.data.v1alpha.Dimension.Builder getNextActionDimensio * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -781,7 +803,9 @@ public com.google.analytics.data.v1alpha.DimensionOrBuilder getNextActionDimensi * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextActionOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextActionOrBuilder.java index 398dd665..404a3869 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextActionOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/FunnelNextActionOrBuilder.java @@ -30,7 +30,9 @@ public interface FunnelNextActionOrBuilder * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -45,7 +47,9 @@ public interface FunnelNextActionOrBuilder * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; @@ -60,7 +64,9 @@ public interface FunnelNextActionOrBuilder * The dimension column added to the funnel visualization sub report response. * The next action dimension returns the next dimension value of this * dimension after the user has attained the `i`th funnel step. - * `nextActionDimension` currently only supports the `eventName` dimension. + * `nextActionDimension` currently only supports `eventName` and most Page / + * Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + * cannot be a dimension expression. * * * .google.analytics.data.v1alpha.Dimension next_action_dimension = 1; 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 7ea0ea7d..a9d41197 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 @@ -232,9 +232,9 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_data_v1alpha_FunnelFilterExpressionList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor; + internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_analytics_data_v1alpha_FunnelFilter_fieldAccessorTable; + internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_analytics_data_v1alpha_FunnelEventFilter_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -499,91 +499,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "terScopingB\017\n\rone_parameterB\014\n\none_filte" + "r\"Y\n\035SegmentParameterFilterScoping\022 \n\023in" + "_any_n_day_period\030\001 \001(\003H\000\210\001\001B\026\n\024_in_any_" - + "n_day_period\"\247\003\n\026FunnelFilterExpression\022" + + "n_day_period\"\262\003\n\026FunnelFilterExpression\022" + "N\n\tand_group\030\001 \001(\01329.google.analytics.da" + "ta.v1alpha.FunnelFilterExpressionListH\000\022" + "M\n\010or_group\030\002 \001(\01329.google.analytics.dat" + "a.v1alpha.FunnelFilterExpressionListH\000\022O" + "\n\016not_expression\030\003 \001(\01325.google.analytic" + "s.data.v1alpha.FunnelFilterExpressionH\000\022" - + "D\n\rfunnel_filter\030\004 \001(\0132+.google.analytic" - + "s.data.v1alpha.FunnelFilterH\000\022O\n\023funnel_" - + "event_filter\030\005 \001(\01320.google.analytics.da" - + "ta.v1alpha.FunnelEventFilterH\000B\006\n\004expr\"h" - + "\n\032FunnelFilterExpressionList\022J\n\013expressi" - + "ons\030\001 \003(\01325.google.analytics.data.v1alph" - + "a.FunnelFilterExpression\"\315\002\n\014FunnelFilte" - + "r\022\022\n\nfield_name\030\001 \001(\t\022D\n\rstring_filter\030\004" - + " \001(\0132+.google.analytics.data.v1alpha.Str" - + "ingFilterH\000\022E\n\016in_list_filter\030\005 \001(\0132+.go" - + "ogle.analytics.data.v1alpha.InListFilter" - + "H\000\022F\n\016numeric_filter\030\006 \001(\0132,.google.anal" - + "ytics.data.v1alpha.NumericFilterH\000\022F\n\016be" - + "tween_filter\030\007 \001(\0132,.google.analytics.da" - + "ta.v1alpha.BetweenFilterH\000B\014\n\none_filter" - + "\"\323\001\n\021FunnelEventFilter\022\027\n\nevent_name\030\001 \001" - + "(\tH\000\210\001\001\022o\n\"funnel_parameter_filter_expre" - + "ssion\030\002 \001(\0132>.google.analytics.data.v1al" - + "pha.FunnelParameterFilterExpressionH\001\210\001\001" - + "B\r\n\013_event_nameB%\n#_funnel_parameter_fil" - + "ter_expression\"\215\003\n\037FunnelParameterFilter" - + "Expression\022W\n\tand_group\030\001 \001(\0132B.google.a" - + "nalytics.data.v1alpha.FunnelParameterFil" - + "terExpressionListH\000\022V\n\010or_group\030\002 \001(\0132B." - + "google.analytics.data.v1alpha.FunnelPara" - + "meterFilterExpressionListH\000\022X\n\016not_expre" - + "ssion\030\003 \001(\0132>.google.analytics.data.v1al" - + "pha.FunnelParameterFilterExpressionH\000\022W\n" - + "\027funnel_parameter_filter\030\004 \001(\01324.google." - + "analytics.data.v1alpha.FunnelParameterFi" - + "lterH\000B\006\n\004expr\"z\n#FunnelParameterFilterE" - + "xpressionList\022S\n\013expressions\030\001 \003(\0132>.goo" - + "gle.analytics.data.v1alpha.FunnelParamet" - + "erFilterExpression\"\222\003\n\025FunnelParameterFi" - + "lter\022\036\n\024event_parameter_name\030\001 \001(\tH\000\022\035\n\023" - + "item_parameter_name\030\002 \001(\tH\000\022D\n\rstring_fi" - + "lter\030\004 \001(\0132+.google.analytics.data.v1alp" - + "ha.StringFilterH\001\022E\n\016in_list_filter\030\005 \001(" - + "\0132+.google.analytics.data.v1alpha.InList" - + "FilterH\001\022F\n\016numeric_filter\030\006 \001(\0132,.googl" - + "e.analytics.data.v1alpha.NumericFilterH\001" - + "\022F\n\016between_filter\030\007 \001(\0132,.google.analyt" - + "ics.data.v1alpha.BetweenFilterH\001B\017\n\rone_" - + "parameterB\014\n\none_filter\"e\n\026FunnelRespons" - + "eMetadata\022K\n\022sampling_metadatas\030\001 \003(\0132/." - + "google.analytics.data.v1alpha.SamplingMe" - + "tadata\"K\n\020SamplingMetadata\022\032\n\022samples_re" - + "ad_count\030\001 \001(\003\022\033\n\023sampling_space_size\030\002 " - + "\001(\003*\257\001\n\023UserCriteriaScoping\022%\n!USER_CRIT" - + "ERIA_SCOPING_UNSPECIFIED\020\000\022#\n\037USER_CRITE" - + "RIA_WITHIN_SAME_EVENT\020\001\022%\n!USER_CRITERIA" - + "_WITHIN_SAME_SESSION\020\002\022%\n!USER_CRITERIA_" - + "ACROSS_ALL_SESSIONS\020\003*|\n\025UserExclusionDu" - + "ration\022\'\n#USER_EXCLUSION_DURATION_UNSPEC" - + "IFIED\020\000\022\034\n\030USER_EXCLUSION_TEMPORARY\020\001\022\034\n" - + "\030USER_EXCLUSION_PERMANENT\020\002*\224\001\n\026SessionC" - + "riteriaScoping\022(\n$SESSION_CRITERIA_SCOPI" - + "NG_UNSPECIFIED\020\000\022&\n\"SESSION_CRITERIA_WIT" - + "HIN_SAME_EVENT\020\001\022(\n$SESSION_CRITERIA_WIT" - + "HIN_SAME_SESSION\020\002*\210\001\n\030SessionExclusionD" - + "uration\022*\n&SESSION_EXCLUSION_DURATION_UN" - + "SPECIFIED\020\000\022\037\n\033SESSION_EXCLUSION_TEMPORA" - + "RY\020\001\022\037\n\033SESSION_EXCLUSION_PERMANENT\020\002*d\n" - + "\024EventCriteriaScoping\022&\n\"EVENT_CRITERIA_" - + "SCOPING_UNSPECIFIED\020\000\022$\n EVENT_CRITERIA_" - + "WITHIN_SAME_EVENT\020\001*a\n\026EventExclusionDur" - + "ation\022(\n$EVENT_EXCLUSION_DURATION_UNSPEC" - + "IFIED\020\000\022\035\n\031EVENT_EXCLUSION_PERMANENT\020\001*\201" - + "\002\n\nMetricType\022\033\n\027METRIC_TYPE_UNSPECIFIED" - + "\020\000\022\020\n\014TYPE_INTEGER\020\001\022\016\n\nTYPE_FLOAT\020\002\022\020\n\014" - + "TYPE_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\rTYPE_" - + "STANDARD\020\010\022\021\n\rTYPE_CURRENCY\020\t\022\r\n\tTYPE_FE" - + "ET\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.analyti" - + "cs.data.v1alphaB\021ReportingApiProtoP\001ZAgo" - + "ogle.golang.org/genproto/googleapis/anal" - + "ytics/data/v1alpha;datab\006proto3" + + "O\n\023funnel_field_filter\030\004 \001(\01320.google.an" + + "alytics.data.v1alpha.FunnelFieldFilterH\000" + + "\022O\n\023funnel_event_filter\030\005 \001(\01320.google.a" + + "nalytics.data.v1alpha.FunnelEventFilterH" + + "\000B\006\n\004expr\"h\n\032FunnelFilterExpressionList\022" + + "J\n\013expressions\030\001 \003(\01325.google.analytics." + + "data.v1alpha.FunnelFilterExpression\"\322\002\n\021" + + "FunnelFieldFilter\022\022\n\nfield_name\030\001 \001(\t\022D\n" + + "\rstring_filter\030\004 \001(\0132+.google.analytics." + + "data.v1alpha.StringFilterH\000\022E\n\016in_list_f" + + "ilter\030\005 \001(\0132+.google.analytics.data.v1al" + + "pha.InListFilterH\000\022F\n\016numeric_filter\030\006 \001" + + "(\0132,.google.analytics.data.v1alpha.Numer" + + "icFilterH\000\022F\n\016between_filter\030\007 \001(\0132,.goo" + + "gle.analytics.data.v1alpha.BetweenFilter" + + "H\000B\014\n\none_filter\"\323\001\n\021FunnelEventFilter\022\027" + + "\n\nevent_name\030\001 \001(\tH\000\210\001\001\022o\n\"funnel_parame" + + "ter_filter_expression\030\002 \001(\0132>.google.ana" + + "lytics.data.v1alpha.FunnelParameterFilte" + + "rExpressionH\001\210\001\001B\r\n\013_event_nameB%\n#_funn" + + "el_parameter_filter_expression\"\215\003\n\037Funne" + + "lParameterFilterExpression\022W\n\tand_group\030" + + "\001 \001(\0132B.google.analytics.data.v1alpha.Fu" + + "nnelParameterFilterExpressionListH\000\022V\n\010o" + + "r_group\030\002 \001(\0132B.google.analytics.data.v1" + + "alpha.FunnelParameterFilterExpressionLis" + + "tH\000\022X\n\016not_expression\030\003 \001(\0132>.google.ana" + + "lytics.data.v1alpha.FunnelParameterFilte" + + "rExpressionH\000\022W\n\027funnel_parameter_filter" + + "\030\004 \001(\01324.google.analytics.data.v1alpha.F" + + "unnelParameterFilterH\000B\006\n\004expr\"z\n#Funnel" + + "ParameterFilterExpressionList\022S\n\013express" + + "ions\030\001 \003(\0132>.google.analytics.data.v1alp" + + "ha.FunnelParameterFilterExpression\"\222\003\n\025F" + + "unnelParameterFilter\022\036\n\024event_parameter_" + + "name\030\001 \001(\tH\000\022\035\n\023item_parameter_name\030\002 \001(" + + "\tH\000\022D\n\rstring_filter\030\004 \001(\0132+.google.anal" + + "ytics.data.v1alpha.StringFilterH\001\022E\n\016in_" + + "list_filter\030\005 \001(\0132+.google.analytics.dat" + + "a.v1alpha.InListFilterH\001\022F\n\016numeric_filt" + + "er\030\006 \001(\0132,.google.analytics.data.v1alpha" + + ".NumericFilterH\001\022F\n\016between_filter\030\007 \001(\013" + + "2,.google.analytics.data.v1alpha.Between" + + "FilterH\001B\017\n\rone_parameterB\014\n\none_filter\"" + + "e\n\026FunnelResponseMetadata\022K\n\022sampling_me" + + "tadatas\030\001 \003(\0132/.google.analytics.data.v1" + + "alpha.SamplingMetadata\"K\n\020SamplingMetada" + + "ta\022\032\n\022samples_read_count\030\001 \001(\003\022\033\n\023sampli" + + "ng_space_size\030\002 \001(\003*\257\001\n\023UserCriteriaScop" + + "ing\022%\n!USER_CRITERIA_SCOPING_UNSPECIFIED" + + "\020\000\022#\n\037USER_CRITERIA_WITHIN_SAME_EVENT\020\001\022" + + "%\n!USER_CRITERIA_WITHIN_SAME_SESSION\020\002\022%" + + "\n!USER_CRITERIA_ACROSS_ALL_SESSIONS\020\003*|\n" + + "\025UserExclusionDuration\022\'\n#USER_EXCLUSION" + + "_DURATION_UNSPECIFIED\020\000\022\034\n\030USER_EXCLUSIO" + + "N_TEMPORARY\020\001\022\034\n\030USER_EXCLUSION_PERMANEN" + + "T\020\002*\224\001\n\026SessionCriteriaScoping\022(\n$SESSIO" + + "N_CRITERIA_SCOPING_UNSPECIFIED\020\000\022&\n\"SESS" + + "ION_CRITERIA_WITHIN_SAME_EVENT\020\001\022(\n$SESS" + + "ION_CRITERIA_WITHIN_SAME_SESSION\020\002*\210\001\n\030S" + + "essionExclusionDuration\022*\n&SESSION_EXCLU" + + "SION_DURATION_UNSPECIFIED\020\000\022\037\n\033SESSION_E" + + "XCLUSION_TEMPORARY\020\001\022\037\n\033SESSION_EXCLUSIO" + + "N_PERMANENT\020\002*d\n\024EventCriteriaScoping\022&\n" + + "\"EVENT_CRITERIA_SCOPING_UNSPECIFIED\020\000\022$\n" + + " EVENT_CRITERIA_WITHIN_SAME_EVENT\020\001*a\n\026E" + + "ventExclusionDuration\022(\n$EVENT_EXCLUSION" + + "_DURATION_UNSPECIFIED\020\000\022\035\n\031EVENT_EXCLUSI" + + "ON_PERMANENT\020\001*\201\002\n\nMetricType\022\033\n\027METRIC_" + + "TYPE_UNSPECIFIED\020\000\022\020\n\014TYPE_INTEGER\020\001\022\016\n\n" + + "TYPE_FLOAT\020\002\022\020\n\014TYPE_SECONDS\020\004\022\025\n\021TYPE_M" + + "ILLISECONDS\020\005\022\020\n\014TYPE_MINUTES\020\006\022\016\n\nTYPE_" + + "HOURS\020\007\022\021\n\rTYPE_STANDARD\020\010\022\021\n\rTYPE_CURRE" + + "NCY\020\t\022\r\n\tTYPE_FEET\020\n\022\016\n\nTYPE_MILES\020\013\022\017\n\013" + + "TYPE_METERS\020\014\022\023\n\017TYPE_KILOMETERS\020\rB{\n!co" + + "m.google.analytics.data.v1alphaB\021Reporti" + + "ngApiProtoP\001ZAgoogle.golang.org/genproto" + + "/googleapis/analytics/data/v1alpha;datab" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1023,7 +1024,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_data_v1alpha_FunnelFilterExpression_descriptor, new java.lang.String[] { - "AndGroup", "OrGroup", "NotExpression", "FunnelFilter", "FunnelEventFilter", "Expr", + "AndGroup", + "OrGroup", + "NotExpression", + "FunnelFieldFilter", + "FunnelEventFilter", + "Expr", }); internal_static_google_analytics_data_v1alpha_FunnelFilterExpressionList_descriptor = getDescriptor().getMessageTypes().get(48); @@ -1033,11 +1039,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Expressions", }); - internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor = + internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor = getDescriptor().getMessageTypes().get(49); - internal_static_google_analytics_data_v1alpha_FunnelFilter_fieldAccessorTable = + internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_analytics_data_v1alpha_FunnelFilter_descriptor, + internal_static_google_analytics_data_v1alpha_FunnelFieldFilter_descriptor, new java.lang.String[] { "FieldName", "StringFilter", diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequest.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequest.java index 894352f3..40f94f8e 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequest.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequest.java @@ -662,9 +662,11 @@ public com.google.analytics.data.v1alpha.FunnelBreakdownOrBuilder getFunnelBreak *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -681,9 +683,11 @@ public boolean hasFunnelNextAction() { *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -702,9 +706,11 @@ public com.google.analytics.data.v1alpha.FunnelNextAction getFunnelNextAction() *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2520,9 +2526,11 @@ public com.google.analytics.data.v1alpha.FunnelBreakdown.Builder getFunnelBreakd *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2538,9 +2546,11 @@ public boolean hasFunnelNextAction() { *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2562,9 +2572,11 @@ public com.google.analytics.data.v1alpha.FunnelNextAction getFunnelNextAction() *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2588,9 +2600,11 @@ public Builder setFunnelNextAction(com.google.analytics.data.v1alpha.FunnelNextA *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2612,9 +2626,11 @@ public Builder setFunnelNextAction( *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2642,9 +2658,11 @@ public Builder mergeFunnelNextAction(com.google.analytics.data.v1alpha.FunnelNex *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2666,9 +2684,11 @@ public Builder clearFunnelNextAction() { *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2684,9 +2704,11 @@ public com.google.analytics.data.v1alpha.FunnelNextAction.Builder getFunnelNextA *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -2707,9 +2729,11 @@ public com.google.analytics.data.v1alpha.FunnelNextAction.Builder getFunnelNextA *
      * If specified, next action adds a dimension to the funnel visualization sub
      * report response. This next action dimension expands each funnel step to the
-     * unique values of the next action. For example a breakdown by the
+     * unique values of the next action. For example a next action of the
      * `eventName` dimension will create rows for several events (i.e.
      * `session_start` & `click`) and the total.
+     * Next action only supports `eventName` and most Page / Screen dimensions
+     * like `pageTitle` and `pagePath`.
      * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; diff --git a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequestOrBuilder.java b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequestOrBuilder.java index 8bdda226..b95cef5f 100644 --- a/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequestOrBuilder.java +++ b/proto-google-analytics-data-v1alpha/src/main/java/com/google/analytics/data/v1alpha/RunFunnelReportRequestOrBuilder.java @@ -218,9 +218,11 @@ public interface RunFunnelReportRequestOrBuilder *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -234,9 +236,11 @@ public interface RunFunnelReportRequestOrBuilder *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; @@ -250,9 +254,11 @@ public interface RunFunnelReportRequestOrBuilder *
    * If specified, next action adds a dimension to the funnel visualization sub
    * report response. This next action dimension expands each funnel step to the
-   * unique values of the next action. For example a breakdown by the
+   * unique values of the next action. For example a next action of the
    * `eventName` dimension will create rows for several events (i.e.
    * `session_start` & `click`) and the total.
+   * Next action only supports `eventName` and most Page / Screen dimensions
+   * like `pageTitle` and `pagePath`.
    * 
* * .google.analytics.data.v1alpha.FunnelNextAction funnel_next_action = 5; 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 64be8151..f86cf8db 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 @@ -96,9 +96,12 @@ message RunFunnelReportRequest { // If specified, next action adds a dimension to the funnel visualization sub // report response. This next action dimension expands each funnel step to the - // unique values of the next action. For example a breakdown by the + // unique values of the next action. For example a next action of the // `eventName` dimension will create rows for several events (i.e. // `session_start` & `click`) and the total. + // + // Next action only supports `eventName` and most Page / Screen dimensions + // like `pageTitle` and `pagePath`. FunnelNextAction funnel_next_action = 5; // The funnel visualization type controls the dimensions present in the funnel 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 6c566e20..9ef9f614 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 @@ -403,7 +403,10 @@ message FunnelNextAction { // The dimension column added to the funnel visualization sub report response. // The next action dimension returns the next dimension value of this // dimension after the user has attained the `i`th funnel step. - // `nextActionDimension` currently only supports the `eventName` dimension. + // + // `nextActionDimension` currently only supports `eventName` and most Page / + // Screen dimensions like `pageTitle` and `pagePath`. `nextActionDimension` + // cannot be a dimension expression. Dimension next_action_dimension = 1; // The maximum number of distinct values of the breakdown dimension to return @@ -1026,8 +1029,8 @@ message FunnelFilterExpression { // The FunnelFilterExpression is NOT of `notExpression`. FunnelFilterExpression not_expression = 3; - // A primitive funnel filter. - FunnelFilter funnel_filter = 4; + // A funnel filter for a dimension or metric. + FunnelFieldFilter funnel_field_filter = 4; // Creates a filter that matches events of a single event name. If a // parameter filter expression is specified, only the subset of events that @@ -1044,7 +1047,7 @@ message FunnelFilterExpressionList { } // An expression to filter dimension or metric values. -message FunnelFilter { +message FunnelFieldFilter { // The dimension name or metric name. string field_name = 1; From 14d86842eb1a67b9144fe2c48ac4e6a92689ef69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:32:32 +0200 Subject: [PATCH 08/12] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-analytics-data). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 719e36db..f11e7acb 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.12.0 + 2.13.0 pom import From d842df1cbc0baa68bf6d9fc227d4ec4d6e519561 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:32:14 +0000 Subject: [PATCH 09/12] chore: update dependencies for regapic (#1467) (#509) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f0627..f0625e4d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45..f8f957af 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From 99a8080cc02a10a682fd2472764ad4098ba808cf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:20:15 +0000 Subject: [PATCH 10/12] chore: Disable CLIRR checks on releas (#1474) (#513) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4d..a454a61e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f..1dba8de1 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From 8fc1e1373aa2e2648552735b0b6acfeacc72a2ac Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Jul 2022 10:24:23 -0400 Subject: [PATCH 11/12] ci: removing clirr from required checks (#512) Making CLIRR not required. The version bumps are now controlled by the Release Please and OwlBot. The CL authors create appropriate change description to control major version bumps. --- .github/sync-repo-settings.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 8c84835d..4543e6d2 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,7 +11,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -26,7 +25,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (7) - units (8) - units (11) From a136c54c08602ad0a2bd73dd99083fd0d2bd37bb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:30:10 +0000 Subject: [PATCH 12/12] chore(main): release 0.14.0 (#507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [0.14.0](https://github.com/googleapis/java-analytics-data/compare/v0.13.0...v0.14.0) (2022-07-01) ### ⚠ BREAKING CHANGES * rename the `funnel_filter` field of the `FunnelFilterExpression` type to `funnel_field_filter` * rename the type `FunnelFilter` to `FunnelFieldFilter` (#505) ### Features * Add Java REST transport to analytics, servicecontrol, servicemanagement, serviceusage and langauge APIs ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) ### Bug Fixes * rename the `funnel_filter` field of the `FunnelFilterExpression` type to `funnel_field_filter` ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) * rename the type `FunnelFilter` to `FunnelFieldFilter` ([#505](https://github.com/googleapis/java-analytics-data/issues/505)) ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#508](https://github.com/googleapis/java-analytics-data/issues/508)) ([14d8684](https://github.com/googleapis/java-analytics-data/commit/14d86842eb1a67b9144fe2c48ac4e6a92689ef69)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 23 +++++++++++++++++++++ google-analytics-data-bom/pom.xml | 12 +++++------ google-analytics-data/pom.xml | 4 ++-- grpc-google-analytics-data-v1alpha/pom.xml | 4 ++-- grpc-google-analytics-data-v1beta/pom.xml | 4 ++-- pom.xml | 12 +++++------ proto-google-analytics-data-v1alpha/pom.xml | 4 ++-- proto-google-analytics-data-v1beta/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 10 ++++----- 10 files changed, 51 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abe5028d..9d2a1b69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [0.14.0](https://github.com/googleapis/java-analytics-data/compare/v0.13.0...v0.14.0) (2022-07-01) + + +### ⚠ BREAKING CHANGES + +* rename the `funnel_filter` field of the `FunnelFilterExpression` type to `funnel_field_filter` +* rename the type `FunnelFilter` to `FunnelFieldFilter` (#505) + +### Features + +* Add Java REST transport to analytics, servicecontrol, servicemanagement, serviceusage and langauge APIs ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) + + +### Bug Fixes + +* rename the `funnel_filter` field of the `FunnelFilterExpression` type to `funnel_field_filter` ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) +* rename the type `FunnelFilter` to `FunnelFieldFilter` ([#505](https://github.com/googleapis/java-analytics-data/issues/505)) ([c864df4](https://github.com/googleapis/java-analytics-data/commit/c864df4d54144195c83948ff695c6c8b671f5807)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#508](https://github.com/googleapis/java-analytics-data/issues/508)) ([14d8684](https://github.com/googleapis/java-analytics-data/commit/14d86842eb1a67b9144fe2c48ac4e6a92689ef69)) + ## [0.13.0](https://github.com/googleapis/java-analytics-data/compare/v0.12.0...v0.13.0) (2022-05-19) diff --git a/google-analytics-data-bom/pom.xml b/google-analytics-data-bom/pom.xml index 5eda5b70..9452f7c0 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.13.1-SNAPSHOT + 0.14.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.analytics google-analytics-data - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.13.1-SNAPSHOT + 0.14.0
diff --git a/google-analytics-data/pom.xml b/google-analytics-data/pom.xml index fbe83db3..15a69818 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.13.1-SNAPSHOT + 0.14.0 jar Google Analytics Data https://github.com/googleapis/java-analytics-data @@ -11,7 +11,7 @@ com.google.analytics google-analytics-data-parent - 0.13.1-SNAPSHOT + 0.14.0 google-analytics-data diff --git a/grpc-google-analytics-data-v1alpha/pom.xml b/grpc-google-analytics-data-v1alpha/pom.xml index 96fd065a..be393852 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.13.1-SNAPSHOT + 0.14.0 grpc-google-analytics-data-v1alpha GRPC library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/grpc-google-analytics-data-v1beta/pom.xml b/grpc-google-analytics-data-v1beta/pom.xml index 66e9377b..38203975 100644 --- a/grpc-google-analytics-data-v1beta/pom.xml +++ b/grpc-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 grpc-google-analytics-data-v1beta GRPC library for grpc-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/pom.xml b/pom.xml index f11e7acb..dc121003 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-data-parent pom - 0.13.1-SNAPSHOT + 0.14.0 Google Analytics Data Parent https://github.com/googleapis/java-analytics-data @@ -61,27 +61,27 @@ com.google.analytics google-analytics-data - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc proto-google-analytics-data-v1alpha - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc grpc-google-analytics-data-v1alpha - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 com.google.api.grpc grpc-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/proto-google-analytics-data-v1alpha/pom.xml b/proto-google-analytics-data-v1alpha/pom.xml index d4fb8d25..1e6444f5 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.13.1-SNAPSHOT + 0.14.0 proto-google-analytics-data-v1alpha Proto library for google-analytics-data com.google.analytics google-analytics-data-parent - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/proto-google-analytics-data-v1beta/pom.xml b/proto-google-analytics-data-v1beta/pom.xml index fb238932..7a3a1744 100644 --- a/proto-google-analytics-data-v1beta/pom.xml +++ b/proto-google-analytics-data-v1beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-data-v1beta - 0.13.1-SNAPSHOT + 0.14.0 proto-google-analytics-data-v1beta PROTO library for proto-google-analytics-data-v1beta com.google.analytics google-analytics-data-parent - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 32d4179d..c46e165f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -40,7 +40,7 @@ com.google.analytics google-analytics-data - 0.13.1-SNAPSHOT + 0.14.0 diff --git a/versions.txt b/versions.txt index 0c2dfc84..9b2f1861 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-analytics-data:0.13.0:0.13.1-SNAPSHOT -grpc-google-analytics-data-v1beta:0.13.0:0.13.1-SNAPSHOT -proto-google-analytics-data-v1beta:0.13.0:0.13.1-SNAPSHOT -proto-google-analytics-data-v1alpha:0.13.0:0.13.1-SNAPSHOT -grpc-google-analytics-data-v1alpha:0.13.0:0.13.1-SNAPSHOT +google-analytics-data:0.14.0:0.14.0 +grpc-google-analytics-data-v1beta:0.14.0:0.14.0 +proto-google-analytics-data-v1beta:0.14.0:0.14.0 +proto-google-analytics-data-v1alpha:0.14.0:0.14.0 +grpc-google-analytics-data-v1alpha:0.14.0:0.14.0