diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 00000000..20f3acc2 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,7 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata new file mode 100644 index 00000000..3fa681c2 --- /dev/null +++ b/.github/readme/synth.metadata/synth.metadata @@ -0,0 +1,18 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/java-analytics-admin.git", + "sha": "6f5074afa7e66ce30a549578cf64e65d6dd4c304" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" + } + } + ] +} \ No newline at end of file diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..e2d841d6 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 00000000..d4d367cf --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,25 @@ +on: + pull_request_target: + types: [opened, synchronize] + branches: + - master +name: format +jobs: + format-code: + runs-on: ubuntu-latest + env: + ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/setup-java@v1 + with: + java-version: 11 + - run: "mvn com.coveo:fmt-maven-plugin:format" + - uses: googleapis/code-suggester@v1.8.0 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 530a4f22..bca4448c 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,9 +69,16 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] then - pushd samples + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 0a87e6a4..a6f78bf2 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -62,7 +62,7 @@ popd # V2 mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" -pushd target/devsite +pushd target/devsite/reference # create metadata python3 -m docuploader create-metadata \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 131b44f6..60b8a1eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [0.2.0](https://www.github.com/googleapis/java-analytics-admin/compare/v0.1.4...v0.2.0) (2020-11-02) + + +### Features + +* added ListAccountSummaries method ([#74](https://www.github.com/googleapis/java-analytics-admin/issues/74)) ([128bb78](https://www.github.com/googleapis/java-analytics-admin/commit/128bb7882cf36b5ce05b81fbf63c7cc306d9b655)) + + +### Documentation + +* renamed App + Web to Google Analytics 4 (GA4) in public documentation ([#86](https://www.github.com/googleapis/java-analytics-admin/issues/86)) ([22e27ca](https://www.github.com/googleapis/java-analytics-admin/commit/22e27ca307e0b900c1eb89d9872685950ee9e44e)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#81](https://www.github.com/googleapis/java-analytics-admin/issues/81)) ([58cb9b3](https://www.github.com/googleapis/java-analytics-admin/commit/58cb9b3a3bb64904fafae8ea414ddf729b6b6983)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#84](https://www.github.com/googleapis/java-analytics-admin/issues/84)) ([5db8220](https://www.github.com/googleapis/java-analytics-admin/commit/5db82207c3e1e056714dc2dbaf3cd62ae3d849c9)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#91](https://www.github.com/googleapis/java-analytics-admin/issues/91)) ([ac21804](https://www.github.com/googleapis/java-analytics-admin/commit/ac21804451ac2fe557f4cec7b19a7cdb290475e1)) + ### [0.1.4](https://www.github.com/googleapis/java-analytics-admin/compare/v0.1.3...v0.1.4) (2020-10-08) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6b2238bb..2add2547 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ + # Code of Conduct ## Our Pledge @@ -69,12 +70,12 @@ dispute. If you are unable to resolve the matter for any reason, or if the behavior is threatening or harassing, report it. We are dedicated to providing an environment where participants feel welcome and safe. -Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the -Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to receive and address reported violations of the code of conduct. They will then work with a committee consisting of representatives from the Open Source Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out the Project Steward, please email +are uncomfortable reaching out to the Project Steward, please email opensource@google.com. We will investigate every complaint, but you may not receive a direct response. diff --git a/README.md b/README.md index 8c7474aa..a63b0ea1 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,10 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-admin - 0.1.1 + 0.1.4 ``` -[//]: # ({x-version-update-start:google-analytics-admin:released}) - If you are using Gradle, add this to your dependencies ```Groovy compile 'com.google.analytics:google-analytics-admin:0.1.4' @@ -34,7 +32,6 @@ If you are using SBT, add this to your dependencies ```Scala libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.1.4" ``` -[//]: # ({x-version-update-end}) ## Authentication diff --git a/google-analytics-admin-bom/pom.xml b/google-analytics-admin-bom/pom.xml index f8ba3670..623d45b0 100644 --- a/google-analytics-admin-bom/pom.xml +++ b/google-analytics-admin-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.analytics google-analytics-admin-bom - 0.1.4 + 0.2.0 pom com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.4 Google Analytics Admin BOM @@ -68,17 +68,17 @@ com.google.analytics google-analytics-admin - 0.1.4 + 0.2.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 diff --git a/google-analytics-admin/pom.xml b/google-analytics-admin/pom.xml index 0cc96ce4..470375f1 100644 --- a/google-analytics-admin/pom.xml +++ b/google-analytics-admin/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.analytics google-analytics-admin - 0.1.4 + 0.2.0 jar Google Analytics Admin https://github.com/googleapis/java-analytics-admin @@ -11,7 +11,7 @@ com.google.analytics google-analytics-admin-parent - 0.1.4 + 0.2.0 google-analytics-admin diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java index ed6e5f70..2673b73f 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java @@ -37,7 +37,7 @@ // AUTO-GENERATED DOCUMENTATION AND SERVICE /** - * Service Description: Service Interface for the Analytics Admin API (App+Web). + * Service Description: Service Interface for the Analytics Admin API (GA4). * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -254,7 +254,7 @@ public final UnaryCallable getAccountCallable() { /** * Returns all accounts accessible by the caller. * - *

Note that these accounts might not currently have App+Web properties. Soft-deleted (ie: + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are * found. * @@ -280,7 +280,7 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) /** * Returns all accounts accessible by the caller. * - *

Note that these accounts might not currently have App+Web properties. Soft-deleted (ie: + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are * found. * @@ -306,7 +306,7 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) /** * Returns all accounts accessible by the caller. * - *

Note that these accounts might not currently have App+Web properties. Soft-deleted (ie: + *

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are * found. * @@ -573,10 +573,84 @@ public final ProvisionAccountTicketResponse provisionAccountTicket( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lookup for a single "App+Web" Property. + * Returns summaries of all accounts accessible by the caller. * - *

Throws "Target not found" if no such property found, if property is not of the type - * "App+Web", or if caller does not have permissions to access it. + *

Sample code: + * + *


+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build();
+   *   for (AccountSummary element : analyticsAdminServiceClient.listAccountSummaries(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountSummariesPagedResponse listAccountSummaries( + ListAccountSummariesRequest request) { + return listAccountSummariesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns summaries of all accounts accessible by the caller. + * + *

Sample code: + * + *


+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build();
+   *   ApiFuture<ListAccountSummariesPagedResponse> future = analyticsAdminServiceClient.listAccountSummariesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (AccountSummary element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAccountSummariesPagedCallable() { + return stub.listAccountSummariesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns summaries of all accounts accessible by the caller. + * + *

Sample code: + * + *


+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build();
+   *   while (true) {
+   *     ListAccountSummariesResponse response = analyticsAdminServiceClient.listAccountSummariesCallable().call(request);
+   *     for (AccountSummary element : response.getAccountSummariesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAccountSummariesCallable() { + return stub.listAccountSummariesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lookup for a single "GA4" Property. + * + *

Throws "Target not found" if no such property found, if property is not of the type "GA4", + * or if caller does not have permissions to access it. * *

Sample code: * @@ -599,10 +673,10 @@ public final Property getProperty(PropertyName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lookup for a single "App+Web" Property. + * Lookup for a single "GA4" Property. * - *

Throws "Target not found" if no such property found, if property is not of the type - * "App+Web", or if caller does not have permissions to access it. + *

Throws "Target not found" if no such property found, if property is not of the type "GA4", + * or if caller does not have permissions to access it. * *

Sample code: * @@ -624,10 +698,10 @@ public final Property getProperty(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lookup for a single "App+Web" Property. + * Lookup for a single "GA4" Property. * - *

Throws "Target not found" if no such property found, if property is not of the type - * "App+Web", or if caller does not have permissions to access it. + *

Throws "Target not found" if no such property found, if property is not of the type "GA4", + * or if caller does not have permissions to access it. * *

Sample code: * @@ -650,10 +724,10 @@ public final Property getProperty(GetPropertyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lookup for a single "App+Web" Property. + * Lookup for a single "GA4" Property. * - *

Throws "Target not found" if no such property found, if property is not of the type - * "App+Web", or if caller does not have permissions to access it. + *

Throws "Target not found" if no such property found, if property is not of the type "GA4", + * or if caller does not have permissions to access it. * *

Sample code: * @@ -677,9 +751,9 @@ public final UnaryCallable getPropertyCallable() { /** * Returns child Properties under the specified parent Account. * - *

Only "App+Web" properties will be returned. Properties will be excluded if the caller does - * not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an - * empty list if no relevant properties are found. + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. * *

Sample code: * @@ -706,9 +780,9 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re /** * Returns child Properties under the specified parent Account. * - *

Only "App+Web" properties will be returned. Properties will be excluded if the caller does - * not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an - * empty list if no relevant properties are found. + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. * *

Sample code: * @@ -735,9 +809,9 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re /** * Returns child Properties under the specified parent Account. * - *

Only "App+Web" properties will be returned. Properties will be excluded if the caller does - * not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an - * empty list if no relevant properties are found. + *

Only "GA4" properties will be returned. Properties will be excluded if the caller does not + * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty + * list if no relevant properties are found. * *

Sample code: * @@ -769,7 +843,7 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates an "App+Web" property with the specified location and attributes. + * Creates an "GA4" property with the specified location and attributes. * *

Sample code: * @@ -792,7 +866,7 @@ public final Property createProperty(Property property) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates an "App+Web" property with the specified location and attributes. + * Creates an "GA4" property with the specified location and attributes. * *

Sample code: * @@ -815,7 +889,7 @@ public final Property createProperty(CreatePropertyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates an "App+Web" property with the specified location and attributes. + * Creates an "GA4" property with the specified location and attributes. * *

Sample code: * @@ -846,7 +920,7 @@ public final UnaryCallable createPropertyCallab * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * - *

Returns an error if the target is not found, or is not an App+Web Property. + *

Returns an error if the target is not found, or is not an GA4 Property. * *

Sample code: * @@ -878,7 +952,7 @@ public final void deleteProperty(PropertyName name) { * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * - *

Returns an error if the target is not found, or is not an App+Web Property. + *

Returns an error if the target is not found, or is not an GA4 Property. * *

Sample code: * @@ -909,7 +983,7 @@ public final void deleteProperty(String name) { * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * - *

Returns an error if the target is not found, or is not an App+Web Property. + *

Returns an error if the target is not found, or is not an GA4 Property. * *

Sample code: * @@ -941,7 +1015,7 @@ public final void deleteProperty(DeletePropertyRequest request) { * resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. * https://support.google.com/analytics/answer/6154772 * - *

Returns an error if the target is not found, or is not an App+Web Property. + *

Returns an error if the target is not found, or is not an GA4 Property. * *

Sample code: * @@ -4724,6 +4798,95 @@ protected ListAccountsFixedSizeCollection createCollection( } } + public static class ListAccountSummariesPagedResponse + extends AbstractPagedListResponse< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage, + ListAccountSummariesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAccountSummariesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAccountSummariesPagedResponse apply(ListAccountSummariesPage input) { + return new ListAccountSummariesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAccountSummariesPagedResponse(ListAccountSummariesPage page) { + super(page, ListAccountSummariesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAccountSummariesPage + extends AbstractPage< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage> { + + private ListAccountSummariesPage( + PageContext + context, + ListAccountSummariesResponse response) { + super(context, response); + } + + private static ListAccountSummariesPage createEmptyPage() { + return new ListAccountSummariesPage(null, null); + } + + @Override + protected ListAccountSummariesPage createPage( + PageContext + context, + ListAccountSummariesResponse response) { + return new ListAccountSummariesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAccountSummariesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + AccountSummary, + ListAccountSummariesPage, + ListAccountSummariesFixedSizeCollection> { + + private ListAccountSummariesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAccountSummariesFixedSizeCollection createEmptyCollection() { + return new ListAccountSummariesFixedSizeCollection(null, 0); + } + + @Override + protected ListAccountSummariesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAccountSummariesFixedSizeCollection(pages, collectionSize); + } + } + public static class ListPropertiesPagedResponse extends AbstractPagedListResponse< ListPropertiesRequest, diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java index f958780b..3067bce1 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java @@ -16,6 +16,7 @@ package com.google.analytics.admin.v1alpha; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAndroidAppDataStreamsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; @@ -103,6 +104,15 @@ public UnaryCallSettings updateAccountSettings() return ((AnalyticsAdminServiceStubSettings) getStubSettings()).provisionAccountTicketSettings(); } + /** Returns the object with the settings used for calls to listAccountSummaries. */ + public PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return ((AnalyticsAdminServiceStubSettings) getStubSettings()).listAccountSummariesSettings(); + } + /** Returns the object with the settings used for calls to getProperty. */ public UnaryCallSettings getPropertySettings() { return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getPropertySettings(); @@ -481,6 +491,15 @@ public UnaryCallSettings.Builder updateAccountSet return getStubSettingsBuilder().provisionAccountTicketSettings(); } + /** Returns the builder for the settings used for calls to listAccountSummaries. */ + public PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return getStubSettingsBuilder().listAccountSummariesSettings(); + } + /** Returns the builder for the settings used for calls to getProperty. */ public UnaryCallSettings.Builder getPropertySettings() { return getStubSettingsBuilder().getPropertySettings(); diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/package-info.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/package-info.java index 56bbff90..7ad090b1 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/package-info.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/package-info.java @@ -15,13 +15,13 @@ */ /** - * A client to Analytics Admin API. + * A client to Google Analytics Admin API. * *

The interfaces provided are listed below, along with usage samples. * *

=========================== AnalyticsAdminServiceClient =========================== * - *

Service Description: Service Interface for the Analytics Admin API (App+Web). + *

Service Description: Service Interface for the Analytics Admin API (GA4). * *

Sample for AnalyticsAdminServiceClient: * diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java index af5f81e4..90cdb8c0 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java @@ -16,6 +16,7 @@ package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAndroidAppDataStreamsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; @@ -65,6 +66,8 @@ import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.IosAppDataStream; +import com.google.analytics.admin.v1alpha.ListAccountSummariesRequest; +import com.google.analytics.admin.v1alpha.ListAccountSummariesResponse; import com.google.analytics.admin.v1alpha.ListAccountsRequest; import com.google.analytics.admin.v1alpha.ListAccountsResponse; import com.google.analytics.admin.v1alpha.ListAndroidAppDataStreamsRequest; @@ -103,7 +106,7 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS /** - * Base stub class for Analytics Admin API. + * Base stub class for Google Analytics Admin API. * *

This class is for advanced usage and reflects the underlying API directly. */ @@ -136,6 +139,16 @@ public UnaryCallable updateAccountCallable() { throw new UnsupportedOperationException("Not implemented: provisionAccountTicketCallable()"); } + public UnaryCallable + listAccountSummariesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountSummariesPagedCallable()"); + } + + public UnaryCallable + listAccountSummariesCallable() { + throw new UnsupportedOperationException("Not implemented: listAccountSummariesCallable()"); + } + public UnaryCallable getPropertyCallable() { throw new UnsupportedOperationException("Not implemented: getPropertyCallable()"); } diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java index ce955324..213b9378 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAndroidAppDataStreamsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; @@ -25,6 +26,7 @@ import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListWebDataStreamsPagedResponse; import com.google.analytics.admin.v1alpha.Account; +import com.google.analytics.admin.v1alpha.AccountSummary; import com.google.analytics.admin.v1alpha.AndroidAppDataStream; import com.google.analytics.admin.v1alpha.AuditUserLink; import com.google.analytics.admin.v1alpha.AuditUserLinksRequest; @@ -66,6 +68,8 @@ import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.IosAppDataStream; +import com.google.analytics.admin.v1alpha.ListAccountSummariesRequest; +import com.google.analytics.admin.v1alpha.ListAccountSummariesResponse; import com.google.analytics.admin.v1alpha.ListAccountsRequest; import com.google.analytics.admin.v1alpha.ListAccountsResponse; import com.google.analytics.admin.v1alpha.ListAndroidAppDataStreamsRequest; @@ -181,6 +185,11 @@ public class AnalyticsAdminServiceStubSettings private final UnaryCallSettings updateAccountSettings; private final UnaryCallSettings provisionAccountTicketSettings; + private final PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings; private final UnaryCallSettings getPropertySettings; private final PagedCallSettings< ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> @@ -292,6 +301,15 @@ public UnaryCallSettings updateAccountSettings() return provisionAccountTicketSettings; } + /** Returns the object with the settings used for calls to listAccountSummaries. */ + public PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return listAccountSummariesSettings; + } + /** Returns the object with the settings used for calls to getProperty. */ public UnaryCallSettings getPropertySettings() { return getPropertySettings; @@ -611,6 +629,7 @@ protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOEx deleteAccountSettings = settingsBuilder.deleteAccountSettings().build(); updateAccountSettings = settingsBuilder.updateAccountSettings().build(); provisionAccountTicketSettings = settingsBuilder.provisionAccountTicketSettings().build(); + listAccountSummariesSettings = settingsBuilder.listAccountSummariesSettings().build(); getPropertySettings = settingsBuilder.getPropertySettings().build(); listPropertiesSettings = settingsBuilder.listPropertiesSettings().build(); createPropertySettings = settingsBuilder.createPropertySettings().build(); @@ -696,6 +715,46 @@ public Iterable extractResources(ListAccountsResponse payload) { } }; + private static final PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAccountSummariesRequest injectToken( + ListAccountSummariesRequest payload, String token) { + return ListAccountSummariesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAccountSummariesRequest injectPageSize( + ListAccountSummariesRequest payload, int pageSize) { + return ListAccountSummariesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAccountSummariesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAccountSummariesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAccountSummariesResponse payload) { + return payload.getAccountSummariesList() != null + ? payload.getAccountSummariesList() + : ImmutableList.of(); + } + }; + private static final PagedListDescriptor LIST_PROPERTIES_PAGE_STR_DESC = new PagedListDescriptor() { @@ -992,6 +1051,29 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountSummariesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC, request, context); + return ListAccountSummariesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> LIST_PROPERTIES_PAGE_STR_FACT = @@ -1153,6 +1235,11 @@ public static class Builder private final UnaryCallSettings.Builder< ProvisionAccountTicketRequest, ProvisionAccountTicketResponse> provisionAccountTicketSettings; + private final PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings; private final UnaryCallSettings.Builder getPropertySettings; private final PagedCallSettings.Builder< ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> @@ -1308,6 +1395,9 @@ protected Builder(ClientContext clientContext) { provisionAccountTicketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAccountSummariesSettings = + PagedCallSettings.newBuilder(LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT); + getPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listPropertiesSettings = PagedCallSettings.newBuilder(LIST_PROPERTIES_PAGE_STR_FACT); @@ -1403,6 +1493,7 @@ protected Builder(ClientContext clientContext) { deleteAccountSettings, updateAccountSettings, provisionAccountTicketSettings, + listAccountSummariesSettings, getPropertySettings, listPropertiesSettings, createPropertySettings, @@ -1485,6 +1576,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .listAccountSummariesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder .getPropertySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -1706,6 +1802,7 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { deleteAccountSettings = settings.deleteAccountSettings.toBuilder(); updateAccountSettings = settings.updateAccountSettings.toBuilder(); provisionAccountTicketSettings = settings.provisionAccountTicketSettings.toBuilder(); + listAccountSummariesSettings = settings.listAccountSummariesSettings.toBuilder(); getPropertySettings = settings.getPropertySettings.toBuilder(); listPropertiesSettings = settings.listPropertiesSettings.toBuilder(); createPropertySettings = settings.createPropertySettings.toBuilder(); @@ -1758,6 +1855,7 @@ protected Builder(AnalyticsAdminServiceStubSettings settings) { deleteAccountSettings, updateAccountSettings, provisionAccountTicketSettings, + listAccountSummariesSettings, getPropertySettings, listPropertiesSettings, createPropertySettings, @@ -1846,6 +1944,15 @@ public UnaryCallSettings.Builder updateAccountSet return provisionAccountTicketSettings; } + /** Returns the builder for the settings used for calls to listAccountSummaries. */ + public PagedCallSettings.Builder< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return listAccountSummariesSettings; + } + /** Returns the builder for the settings used for calls to getProperty. */ public UnaryCallSettings.Builder getPropertySettings() { return getPropertySettings; diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java index 47820663..a3ea57f8 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java @@ -36,7 +36,7 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS /** - * gRPC callable factory implementation for Analytics Admin API. + * gRPC callable factory implementation for Google Analytics Admin API. * *

This class is for advanced usage. */ diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java index 59f84385..38c1e71c 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceStub.java @@ -16,6 +16,7 @@ package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAndroidAppDataStreamsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; @@ -65,6 +66,8 @@ import com.google.analytics.admin.v1alpha.GlobalSiteTag; import com.google.analytics.admin.v1alpha.GoogleAdsLink; import com.google.analytics.admin.v1alpha.IosAppDataStream; +import com.google.analytics.admin.v1alpha.ListAccountSummariesRequest; +import com.google.analytics.admin.v1alpha.ListAccountSummariesResponse; import com.google.analytics.admin.v1alpha.ListAccountsRequest; import com.google.analytics.admin.v1alpha.ListAccountsResponse; import com.google.analytics.admin.v1alpha.ListAndroidAppDataStreamsRequest; @@ -114,7 +117,7 @@ // AUTO-GENERATED DOCUMENTATION AND CLASS /** - * gRPC stub implementation for Analytics Admin API. + * gRPC stub implementation for Google Analytics Admin API. * *

This class is for advanced usage and reflects the underlying API directly. */ @@ -169,6 +172,17 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ProvisionAccountTicketResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + listAccountSummariesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.analytics.admin.v1alpha.AnalyticsAdminService/ListAccountSummaries") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAccountSummariesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAccountSummariesResponse.getDefaultInstance())) + .build(); private static final MethodDescriptor getPropertyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -618,6 +632,10 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { private final UnaryCallable updateAccountCallable; private final UnaryCallable provisionAccountTicketCallable; + private final UnaryCallable + listAccountSummariesCallable; + private final UnaryCallable + listAccountSummariesPagedCallable; private final UnaryCallable getPropertyCallable; private final UnaryCallable listPropertiesCallable; private final UnaryCallable @@ -788,6 +806,11 @@ public Map extract(UpdateAccountRequest request) { .newBuilder() .setMethodDescriptor(provisionAccountTicketMethodDescriptor) .build(); + GrpcCallSettings + listAccountSummariesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAccountSummariesMethodDescriptor) + .build(); GrpcCallSettings getPropertyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getPropertyMethodDescriptor) @@ -1381,6 +1404,16 @@ public Map extract(GetDataSharingSettingsRequest request) { provisionAccountTicketTransportSettings, settings.provisionAccountTicketSettings(), clientContext); + this.listAccountSummariesCallable = + callableFactory.createUnaryCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); + this.listAccountSummariesPagedCallable = + callableFactory.createPagedCallable( + listAccountSummariesTransportSettings, + settings.listAccountSummariesSettings(), + clientContext); this.getPropertyCallable = callableFactory.createUnaryCallable( getPropertyTransportSettings, settings.getPropertySettings(), clientContext); @@ -1623,6 +1656,16 @@ public UnaryCallable updateAccountCallable() { return provisionAccountTicketCallable; } + public UnaryCallable + listAccountSummariesPagedCallable() { + return listAccountSummariesPagedCallable; + } + + public UnaryCallable + listAccountSummariesCallable() { + return listAccountSummariesCallable; + } + public UnaryCallable getPropertyCallable() { return getPropertyCallable; } diff --git a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java index a8bbab31..d6cdf05f 100644 --- a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java +++ b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.analytics.admin.v1alpha; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; +import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountSummariesPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAccountsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListAndroidAppDataStreamsPagedResponse; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.ListGoogleAdsLinksPagedResponse; @@ -311,6 +312,53 @@ public void provisionAccountTicketExceptionTest() throws Exception { } } + @Test + @SuppressWarnings("all") + public void listAccountSummariesTest() { + String nextPageToken = ""; + AccountSummary accountSummariesElement = AccountSummary.newBuilder().build(); + List accountSummaries = Arrays.asList(accountSummariesElement); + ListAccountSummariesResponse expectedResponse = + ListAccountSummariesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllAccountSummaries(accountSummaries) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build(); + + ListAccountSummariesPagedResponse pagedListResponse = client.listAccountSummaries(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAccountSummariesList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAccountSummariesRequest actualRequest = (ListAccountSummariesRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listAccountSummariesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build(); + + client.listAccountSummaries(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void getPropertyTest() { diff --git a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java index 00eb8989..4dbafa2f 100644 --- a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java +++ b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminServiceImpl.java @@ -131,6 +131,22 @@ public void provisionAccountTicket( } } + @Override + public void listAccountSummaries( + ListAccountSummariesRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListAccountSummariesResponse) { + requests.add(request); + responseObserver.onNext((ListAccountSummariesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + @Override public void getProperty(GetPropertyRequest request, StreamObserver responseObserver) { Object response = responses.remove(); diff --git a/grpc-google-analytics-admin-v1alpha/pom.xml b/grpc-google-analytics-admin-v1alpha/pom.xml index 700d5a64..efefac72 100644 --- a/grpc-google-analytics-admin-v1alpha/pom.xml +++ b/grpc-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 grpc-google-analytics-admin-v1alpha GRPC library for grpc-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.1.4 + 0.2.0 diff --git a/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java b/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java index e9d79141..80832bf6 100644 --- a/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java +++ b/grpc-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceGrpc.java @@ -26,7 +26,7 @@ * * *

- * Service Interface for the Analytics Admin API (App+Web).
+ * Service Interface for the Analytics Admin API (GA4).
  * 
*/ @javax.annotation.Generated( @@ -274,6 +274,57 @@ private AnalyticsAdminServiceGrpc() {} return getProvisionAccountTicketMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> + getListAccountSummariesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAccountSummaries", + requestType = com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.class, + responseType = com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> + getListAccountSummariesMethod() { + io.grpc.MethodDescriptor< + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> + getListAccountSummariesMethod; + if ((getListAccountSummariesMethod = AnalyticsAdminServiceGrpc.getListAccountSummariesMethod) + == null) { + synchronized (AnalyticsAdminServiceGrpc.class) { + if ((getListAccountSummariesMethod = + AnalyticsAdminServiceGrpc.getListAccountSummariesMethod) + == null) { + AnalyticsAdminServiceGrpc.getListAccountSummariesMethod = + getListAccountSummariesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListAccountSummaries")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AnalyticsAdminServiceMethodDescriptorSupplier("ListAccountSummaries")) + .build(); + } + } + } + return getListAccountSummariesMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.analytics.admin.v1alpha.GetPropertyRequest, com.google.analytics.admin.v1alpha.Property> @@ -2383,7 +2434,7 @@ public AnalyticsAdminServiceFutureStub newStub( * * *
-   * Service Interface for the Analytics Admin API (App+Web).
+   * Service Interface for the Analytics Admin API (GA4).
    * 
*/ public abstract static class AnalyticsAdminServiceImplBase implements io.grpc.BindableService { @@ -2408,7 +2459,7 @@ public void getAccount( * *
      * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have App+Web properties.
+     * Note that these accounts might not currently have GA4 properties.
      * Soft-deleted (ie: "trashed") accounts are excluded by default.
      * Returns an empty list if no relevant accounts are found.
      * 
@@ -2472,9 +2523,23 @@ public void provisionAccountTicket( * * *
-     * Lookup for a single "App+Web" Property.
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public void listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListAccountSummariesMethod(), responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
      * Throws "Target not found" if no such property found, if property is not
-     * of the type "App+Web", or if caller does not have permissions to access it.
+     * of the type "GA4", or if caller does not have permissions to access it.
      * 
*/ public void getProperty( @@ -2488,7 +2553,7 @@ public void getProperty( * *
      * Returns child Properties under the specified parent Account.
-     * Only "App+Web" properties will be returned.
+     * Only "GA4" properties will be returned.
      * Properties will be excluded if the caller does not have access.
      * Soft-deleted (ie: "trashed") properties are excluded by default.
      * Returns an empty list if no relevant properties are found.
@@ -2505,7 +2570,7 @@ public void listProperties(
      *
      *
      * 
-     * Creates an "App+Web" property with the specified location and attributes.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ public void createProperty( @@ -2525,7 +2590,7 @@ public void createProperty( * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 - * Returns an error if the target is not found, or is not an App+Web Property. + * Returns an error if the target is not found, or is not an GA4 Property. *
*/ public void deleteProperty( @@ -3124,6 +3189,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest, com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse>( this, METHODID_PROVISION_ACCOUNT_TICKET))) + .addMethod( + getListAccountSummariesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse>( + this, METHODID_LIST_ACCOUNT_SUMMARIES))) .addMethod( getGetPropertyMethod(), asyncUnaryCall( @@ -3414,7 +3486,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * * *
-   * Service Interface for the Analytics Admin API (App+Web).
+   * Service Interface for the Analytics Admin API (GA4).
    * 
*/ public static final class AnalyticsAdminServiceStub @@ -3450,7 +3522,7 @@ public void getAccount( * *
      * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have App+Web properties.
+     * Note that these accounts might not currently have GA4 properties.
      * Soft-deleted (ie: "trashed") accounts are excluded by default.
      * Returns an empty list if no relevant accounts are found.
      * 
@@ -3526,9 +3598,26 @@ public void provisionAccountTicket( * * *
-     * Lookup for a single "App+Web" Property.
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public void listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
      * Throws "Target not found" if no such property found, if property is not
-     * of the type "App+Web", or if caller does not have permissions to access it.
+     * of the type "GA4", or if caller does not have permissions to access it.
      * 
*/ public void getProperty( @@ -3545,7 +3634,7 @@ public void getProperty( * *
      * Returns child Properties under the specified parent Account.
-     * Only "App+Web" properties will be returned.
+     * Only "GA4" properties will be returned.
      * Properties will be excluded if the caller does not have access.
      * Soft-deleted (ie: "trashed") properties are excluded by default.
      * Returns an empty list if no relevant properties are found.
@@ -3565,7 +3654,7 @@ public void listProperties(
      *
      *
      * 
-     * Creates an "App+Web" property with the specified location and attributes.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ public void createProperty( @@ -3588,7 +3677,7 @@ public void createProperty( * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 - * Returns an error if the target is not found, or is not an App+Web Property. + * Returns an error if the target is not found, or is not an GA4 Property. *
*/ public void deleteProperty( @@ -4274,7 +4363,7 @@ public void getDataSharingSettings( * * *
-   * Service Interface for the Analytics Admin API (App+Web).
+   * Service Interface for the Analytics Admin API (GA4).
    * 
*/ public static final class AnalyticsAdminServiceBlockingStub @@ -4309,7 +4398,7 @@ public com.google.analytics.admin.v1alpha.Account getAccount( * *
      * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have App+Web properties.
+     * Note that these accounts might not currently have GA4 properties.
      * Soft-deleted (ie: "trashed") accounts are excluded by default.
      * Returns an empty list if no relevant accounts are found.
      * 
@@ -4367,9 +4456,22 @@ public com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse provisi * * *
-     * Lookup for a single "App+Web" Property.
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { + return blockingUnaryCall( + getChannel(), getListAccountSummariesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
      * Throws "Target not found" if no such property found, if property is not
-     * of the type "App+Web", or if caller does not have permissions to access it.
+     * of the type "GA4", or if caller does not have permissions to access it.
      * 
*/ public com.google.analytics.admin.v1alpha.Property getProperty( @@ -4382,7 +4484,7 @@ public com.google.analytics.admin.v1alpha.Property getProperty( * *
      * Returns child Properties under the specified parent Account.
-     * Only "App+Web" properties will be returned.
+     * Only "GA4" properties will be returned.
      * Properties will be excluded if the caller does not have access.
      * Soft-deleted (ie: "trashed") properties are excluded by default.
      * Returns an empty list if no relevant properties are found.
@@ -4397,7 +4499,7 @@ public com.google.analytics.admin.v1alpha.ListPropertiesResponse listProperties(
      *
      *
      * 
-     * Creates an "App+Web" property with the specified location and attributes.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ public com.google.analytics.admin.v1alpha.Property createProperty( @@ -4416,7 +4518,7 @@ public com.google.analytics.admin.v1alpha.Property createProperty( * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 - * Returns an error if the target is not found, or is not an App+Web Property. + * Returns an error if the target is not found, or is not an GA4 Property. *
*/ public com.google.protobuf.Empty deleteProperty( @@ -4951,7 +5053,7 @@ public com.google.analytics.admin.v1alpha.DataSharingSettings getDataSharingSett * * *
-   * Service Interface for the Analytics Admin API (App+Web).
+   * Service Interface for the Analytics Admin API (GA4).
    * 
*/ public static final class AnalyticsAdminServiceFutureStub @@ -4988,7 +5090,7 @@ protected AnalyticsAdminServiceFutureStub build( * *
      * Returns all accounts accessible by the caller.
-     * Note that these accounts might not currently have App+Web properties.
+     * Note that these accounts might not currently have GA4 properties.
      * Soft-deleted (ie: "trashed") accounts are excluded by default.
      * Returns an empty list if no relevant accounts are found.
      * 
@@ -5053,9 +5155,24 @@ protected AnalyticsAdminServiceFutureStub build( * * *
-     * Lookup for a single "App+Web" Property.
+     * Returns summaries of all accounts accessible by the caller.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse> + listAccountSummaries( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListAccountSummariesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lookup for a single "GA4" Property.
      * Throws "Target not found" if no such property found, if property is not
-     * of the type "App+Web", or if caller does not have permissions to access it.
+     * of the type "GA4", or if caller does not have permissions to access it.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -5070,7 +5187,7 @@ protected AnalyticsAdminServiceFutureStub build( * *
      * Returns child Properties under the specified parent Account.
-     * Only "App+Web" properties will be returned.
+     * Only "GA4" properties will be returned.
      * Properties will be excluded if the caller does not have access.
      * Soft-deleted (ie: "trashed") properties are excluded by default.
      * Returns an empty list if no relevant properties are found.
@@ -5087,7 +5204,7 @@ protected AnalyticsAdminServiceFutureStub build(
      *
      *
      * 
-     * Creates an "App+Web" property with the specified location and attributes.
+     * Creates an "GA4" property with the specified location and attributes.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -5108,7 +5225,7 @@ protected AnalyticsAdminServiceFutureStub build( * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) * will be permanently purged. * https://support.google.com/analytics/answer/6154772 - * Returns an error if the target is not found, or is not an App+Web Property. + * Returns an error if the target is not found, or is not an GA4 Property. *
*/ public com.google.common.util.concurrent.ListenableFuture @@ -5697,48 +5814,49 @@ protected AnalyticsAdminServiceFutureStub build( private static final int METHODID_DELETE_ACCOUNT = 2; private static final int METHODID_UPDATE_ACCOUNT = 3; private static final int METHODID_PROVISION_ACCOUNT_TICKET = 4; - private static final int METHODID_GET_PROPERTY = 5; - private static final int METHODID_LIST_PROPERTIES = 6; - private static final int METHODID_CREATE_PROPERTY = 7; - private static final int METHODID_DELETE_PROPERTY = 8; - private static final int METHODID_UPDATE_PROPERTY = 9; - private static final int METHODID_GET_USER_LINK = 10; - private static final int METHODID_BATCH_GET_USER_LINKS = 11; - private static final int METHODID_LIST_USER_LINKS = 12; - private static final int METHODID_AUDIT_USER_LINKS = 13; - private static final int METHODID_CREATE_USER_LINK = 14; - private static final int METHODID_BATCH_CREATE_USER_LINKS = 15; - private static final int METHODID_UPDATE_USER_LINK = 16; - private static final int METHODID_BATCH_UPDATE_USER_LINKS = 17; - private static final int METHODID_DELETE_USER_LINK = 18; - private static final int METHODID_BATCH_DELETE_USER_LINKS = 19; - private static final int METHODID_GET_WEB_DATA_STREAM = 20; - private static final int METHODID_DELETE_WEB_DATA_STREAM = 21; - private static final int METHODID_UPDATE_WEB_DATA_STREAM = 22; - private static final int METHODID_CREATE_WEB_DATA_STREAM = 23; - private static final int METHODID_LIST_WEB_DATA_STREAMS = 24; - private static final int METHODID_GET_IOS_APP_DATA_STREAM = 25; - private static final int METHODID_DELETE_IOS_APP_DATA_STREAM = 26; - private static final int METHODID_UPDATE_IOS_APP_DATA_STREAM = 27; - private static final int METHODID_CREATE_IOS_APP_DATA_STREAM = 28; - private static final int METHODID_LIST_IOS_APP_DATA_STREAMS = 29; - private static final int METHODID_GET_ANDROID_APP_DATA_STREAM = 30; - private static final int METHODID_DELETE_ANDROID_APP_DATA_STREAM = 31; - private static final int METHODID_UPDATE_ANDROID_APP_DATA_STREAM = 32; - private static final int METHODID_CREATE_ANDROID_APP_DATA_STREAM = 33; - private static final int METHODID_LIST_ANDROID_APP_DATA_STREAMS = 34; - private static final int METHODID_GET_ENHANCED_MEASUREMENT_SETTINGS = 35; - private static final int METHODID_UPDATE_ENHANCED_MEASUREMENT_SETTINGS = 36; - private static final int METHODID_CREATE_FIREBASE_LINK = 37; - private static final int METHODID_UPDATE_FIREBASE_LINK = 38; - private static final int METHODID_DELETE_FIREBASE_LINK = 39; - private static final int METHODID_LIST_FIREBASE_LINKS = 40; - private static final int METHODID_GET_GLOBAL_SITE_TAG = 41; - private static final int METHODID_CREATE_GOOGLE_ADS_LINK = 42; - private static final int METHODID_UPDATE_GOOGLE_ADS_LINK = 43; - private static final int METHODID_DELETE_GOOGLE_ADS_LINK = 44; - private static final int METHODID_LIST_GOOGLE_ADS_LINKS = 45; - private static final int METHODID_GET_DATA_SHARING_SETTINGS = 46; + private static final int METHODID_LIST_ACCOUNT_SUMMARIES = 5; + private static final int METHODID_GET_PROPERTY = 6; + private static final int METHODID_LIST_PROPERTIES = 7; + private static final int METHODID_CREATE_PROPERTY = 8; + private static final int METHODID_DELETE_PROPERTY = 9; + private static final int METHODID_UPDATE_PROPERTY = 10; + private static final int METHODID_GET_USER_LINK = 11; + private static final int METHODID_BATCH_GET_USER_LINKS = 12; + private static final int METHODID_LIST_USER_LINKS = 13; + private static final int METHODID_AUDIT_USER_LINKS = 14; + private static final int METHODID_CREATE_USER_LINK = 15; + private static final int METHODID_BATCH_CREATE_USER_LINKS = 16; + private static final int METHODID_UPDATE_USER_LINK = 17; + private static final int METHODID_BATCH_UPDATE_USER_LINKS = 18; + private static final int METHODID_DELETE_USER_LINK = 19; + private static final int METHODID_BATCH_DELETE_USER_LINKS = 20; + private static final int METHODID_GET_WEB_DATA_STREAM = 21; + private static final int METHODID_DELETE_WEB_DATA_STREAM = 22; + private static final int METHODID_UPDATE_WEB_DATA_STREAM = 23; + private static final int METHODID_CREATE_WEB_DATA_STREAM = 24; + private static final int METHODID_LIST_WEB_DATA_STREAMS = 25; + private static final int METHODID_GET_IOS_APP_DATA_STREAM = 26; + private static final int METHODID_DELETE_IOS_APP_DATA_STREAM = 27; + private static final int METHODID_UPDATE_IOS_APP_DATA_STREAM = 28; + private static final int METHODID_CREATE_IOS_APP_DATA_STREAM = 29; + private static final int METHODID_LIST_IOS_APP_DATA_STREAMS = 30; + private static final int METHODID_GET_ANDROID_APP_DATA_STREAM = 31; + private static final int METHODID_DELETE_ANDROID_APP_DATA_STREAM = 32; + private static final int METHODID_UPDATE_ANDROID_APP_DATA_STREAM = 33; + private static final int METHODID_CREATE_ANDROID_APP_DATA_STREAM = 34; + private static final int METHODID_LIST_ANDROID_APP_DATA_STREAMS = 35; + private static final int METHODID_GET_ENHANCED_MEASUREMENT_SETTINGS = 36; + private static final int METHODID_UPDATE_ENHANCED_MEASUREMENT_SETTINGS = 37; + private static final int METHODID_CREATE_FIREBASE_LINK = 38; + private static final int METHODID_UPDATE_FIREBASE_LINK = 39; + private static final int METHODID_DELETE_FIREBASE_LINK = 40; + private static final int METHODID_LIST_FIREBASE_LINKS = 41; + private static final int METHODID_GET_GLOBAL_SITE_TAG = 42; + private static final int METHODID_CREATE_GOOGLE_ADS_LINK = 43; + private static final int METHODID_UPDATE_GOOGLE_ADS_LINK = 44; + private static final int METHODID_DELETE_GOOGLE_ADS_LINK = 45; + private static final int METHODID_LIST_GOOGLE_ADS_LINKS = 46; + private static final int METHODID_GET_DATA_SHARING_SETTINGS = 47; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -5787,6 +5905,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse>) responseObserver); break; + case METHODID_LIST_ACCOUNT_SUMMARIES: + serviceImpl.listAccountSummaries( + (com.google.analytics.admin.v1alpha.ListAccountSummariesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse>) + responseObserver); + break; case METHODID_GET_PROPERTY: serviceImpl.getProperty( (com.google.analytics.admin.v1alpha.GetPropertyRequest) request, @@ -6113,6 +6238,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteAccountMethod()) .addMethod(getUpdateAccountMethod()) .addMethod(getProvisionAccountTicketMethod()) + .addMethod(getListAccountSummariesMethod()) .addMethod(getGetPropertyMethod()) .addMethod(getListPropertiesMethod()) .addMethod(getCreatePropertyMethod()) diff --git a/pom.xml b/pom.xml index 84b5094f..9b066ab8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-admin-parent pom - 0.1.4 + 0.2.0 Google Analytics Admin Parent https://github.com/googleapis/java-analytics-admin @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.4 @@ -70,23 +70,23 @@ com.google.analytics google-analytics-admin - 0.1.4 + 0.2.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 com.google.cloud google-cloud-shared-dependencies - 0.10.2 + 0.14.1 pom import @@ -94,7 +94,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/proto-google-analytics-admin-v1alpha/pom.xml b/proto-google-analytics-admin-v1alpha/pom.xml index 355f3ee3..8297e0c5 100644 --- a/proto-google-analytics-admin-v1alpha/pom.xml +++ b/proto-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.1.4 + 0.2.0 proto-google-analytics-admin-v1alpha PROTO library for proto-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.1.4 + 0.2.0 diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummary.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummary.java new file mode 100644 index 00000000..155ab88b --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummary.java @@ -0,0 +1,1535 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A virtual resource representing an overview of an account and
+ * all its child GA4 properties.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.AccountSummary} + */ +public final class AccountSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.AccountSummary) + AccountSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccountSummary.newBuilder() to construct. + private AccountSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccountSummary() { + name_ = ""; + account_ = ""; + displayName_ = ""; + propertySummaries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccountSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AccountSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + propertySummaries_.add( + input.readMessage( + com.google.analytics.admin.v1alpha.PropertySummary.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = java.util.Collections.unmodifiableList(propertySummaries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_AccountSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.AccountSummary.class, + com.google.analytics.admin.v1alpha.AccountSummary.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_FIELD_NUMBER = 2; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTY_SUMMARIES_FIELD_NUMBER = 4; + private java.util.List propertySummaries_; + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public java.util.List + getPropertySummariesList() { + return propertySummaries_; + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public java.util.List + getPropertySummariesOrBuilderList() { + return propertySummaries_; + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public int getPropertySummariesCount() { + return propertySummaries_.size(); + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummary getPropertySummaries(int index) { + return propertySummaries_.get(index); + } + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder getPropertySummariesOrBuilder( + int index) { + return propertySummaries_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, account_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); + } + for (int i = 0; i < propertySummaries_.size(); i++) { + output.writeMessage(4, propertySummaries_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, account_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); + } + for (int i = 0; i < propertySummaries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, propertySummaries_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.AccountSummary)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.AccountSummary other = + (com.google.analytics.admin.v1alpha.AccountSummary) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAccount().equals(other.getAccount())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getPropertySummariesList().equals(other.getPropertySummariesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (getPropertySummariesCount() > 0) { + hash = (37 * hash) + PROPERTY_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getPropertySummariesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.AccountSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary 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.admin.v1alpha.AccountSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary 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.admin.v1alpha.AccountSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary 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.admin.v1alpha.AccountSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary 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.admin.v1alpha.AccountSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.admin.v1alpha.AccountSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A virtual resource representing an overview of an account and
+   * all its child GA4 properties.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.AccountSummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.AccountSummary) + com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_AccountSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.AccountSummary.class, + com.google.analytics.admin.v1alpha.AccountSummary.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.AccountSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPropertySummariesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + account_ = ""; + + displayName_ = ""; + + if (propertySummariesBuilder_ == null) { + propertySummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + propertySummariesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummary getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.AccountSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummary build() { + com.google.analytics.admin.v1alpha.AccountSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummary buildPartial() { + com.google.analytics.admin.v1alpha.AccountSummary result = + new com.google.analytics.admin.v1alpha.AccountSummary(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.account_ = account_; + result.displayName_ = displayName_; + if (propertySummariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = java.util.Collections.unmodifiableList(propertySummaries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.propertySummaries_ = propertySummaries_; + } else { + result.propertySummaries_ = propertySummariesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.AccountSummary) { + return mergeFrom((com.google.analytics.admin.v1alpha.AccountSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.AccountSummary other) { + if (other == com.google.analytics.admin.v1alpha.AccountSummary.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (propertySummariesBuilder_ == null) { + if (!other.propertySummaries_.isEmpty()) { + if (propertySummaries_.isEmpty()) { + propertySummaries_ = other.propertySummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePropertySummariesIsMutable(); + propertySummaries_.addAll(other.propertySummaries_); + } + onChanged(); + } + } else { + if (!other.propertySummaries_.isEmpty()) { + if (propertySummariesBuilder_.isEmpty()) { + propertySummariesBuilder_.dispose(); + propertySummariesBuilder_ = null; + propertySummaries_ = other.propertySummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + propertySummariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPropertySummariesFieldBuilder() + : null; + } else { + propertySummariesBuilder_.addAllMessages(other.propertySummaries_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.admin.v1alpha.AccountSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1alpha.AccountSummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name for this account summary.
+     * Format: accountSummaries/{account_id}
+     * Example: "accountSummaries/1000"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of account referred to by this account summary
+     * Format: accounts/{account_id}
+     * Example: "accounts/1000"
+     * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the account referred to in this account summary.
+     * 
+ * + * string display_name = 3; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.util.List propertySummaries_ = + java.util.Collections.emptyList(); + + private void ensurePropertySummariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + propertySummaries_ = + new java.util.ArrayList( + propertySummaries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.PropertySummary, + com.google.analytics.admin.v1alpha.PropertySummary.Builder, + com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder> + propertySummariesBuilder_; + + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesList() { + if (propertySummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(propertySummaries_); + } else { + return propertySummariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public int getPropertySummariesCount() { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.size(); + } else { + return propertySummariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1alpha.PropertySummary getPropertySummaries(int index) { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.get(index); + } else { + return propertySummariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder setPropertySummaries( + int index, com.google.analytics.admin.v1alpha.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.set(index, value); + onChanged(); + } else { + propertySummariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder setPropertySummaries( + int index, com.google.analytics.admin.v1alpha.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries(com.google.analytics.admin.v1alpha.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.add(value); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + int index, com.google.analytics.admin.v1alpha.PropertySummary value) { + if (propertySummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropertySummariesIsMutable(); + propertySummaries_.add(index, value); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + com.google.analytics.admin.v1alpha.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.add(builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder addPropertySummaries( + int index, com.google.analytics.admin.v1alpha.PropertySummary.Builder builderForValue) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + propertySummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder addAllPropertySummaries( + java.lang.Iterable values) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, propertySummaries_); + onChanged(); + } else { + propertySummariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder clearPropertySummaries() { + if (propertySummariesBuilder_ == null) { + propertySummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + propertySummariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public Builder removePropertySummaries(int index) { + if (propertySummariesBuilder_ == null) { + ensurePropertySummariesIsMutable(); + propertySummaries_.remove(index); + onChanged(); + } else { + propertySummariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1alpha.PropertySummary.Builder getPropertySummariesBuilder( + int index) { + return getPropertySummariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder + getPropertySummariesOrBuilder(int index) { + if (propertySummariesBuilder_ == null) { + return propertySummaries_.get(index); + } else { + return propertySummariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesOrBuilderList() { + if (propertySummariesBuilder_ != null) { + return propertySummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(propertySummaries_); + } + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1alpha.PropertySummary.Builder + addPropertySummariesBuilder() { + return getPropertySummariesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1alpha.PropertySummary.getDefaultInstance()); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public com.google.analytics.admin.v1alpha.PropertySummary.Builder addPropertySummariesBuilder( + int index) { + return getPropertySummariesFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1alpha.PropertySummary.getDefaultInstance()); + } + /** + * + * + *
+     * List of summaries for child accounts of this account.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + public java.util.List + getPropertySummariesBuilderList() { + return getPropertySummariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.PropertySummary, + com.google.analytics.admin.v1alpha.PropertySummary.Builder, + com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder> + getPropertySummariesFieldBuilder() { + if (propertySummariesBuilder_ == null) { + propertySummariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.PropertySummary, + com.google.analytics.admin.v1alpha.PropertySummary.Builder, + com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder>( + propertySummaries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + propertySummaries_ = null; + } + return propertySummariesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.AccountSummary) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.AccountSummary) + private static final com.google.analytics.admin.v1alpha.AccountSummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.AccountSummary(); + } + + public static com.google.analytics.admin.v1alpha.AccountSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccountSummary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java new file mode 100644 index 00000000..59722647 --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java @@ -0,0 +1,162 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.analytics.admin.v1alpha; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class AccountSummaryName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("accountSummaries/{account_summary}"); + + private volatile Map fieldValuesMap; + + private final String accountSummary; + + public String getAccountSummary() { + return accountSummary; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private AccountSummaryName(Builder builder) { + accountSummary = Preconditions.checkNotNull(builder.getAccountSummary()); + } + + public static AccountSummaryName of(String accountSummary) { + return newBuilder().setAccountSummary(accountSummary).build(); + } + + public static String format(String accountSummary) { + return newBuilder().setAccountSummary(accountSummary).build().toString(); + } + + public static AccountSummaryName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "AccountSummaryName.parse: formattedString not in valid format"); + return of(matchMap.get("account_summary")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (AccountSummaryName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("accountSummary", accountSummary); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("account_summary", accountSummary); + } + + /** Builder for AccountSummaryName. */ + public static class Builder { + + private String accountSummary; + + public String getAccountSummary() { + return accountSummary; + } + + public Builder setAccountSummary(String accountSummary) { + this.accountSummary = accountSummary; + return this; + } + + private Builder() {} + + private Builder(AccountSummaryName accountSummaryName) { + accountSummary = accountSummaryName.accountSummary; + } + + public AccountSummaryName build() { + return new AccountSummaryName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AccountSummaryName) { + AccountSummaryName that = (AccountSummaryName) o; + return (this.accountSummary.equals(that.accountSummary)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= accountSummary.hashCode(); + return h; + } +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryOrBuilder.java new file mode 100644 index 00000000..bc3b45fe --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +public interface AccountSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.AccountSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name for this account summary.
+   * Format: accountSummaries/{account_id}
+   * Example: "accountSummaries/1000"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Resource name of account referred to by this account summary
+   * Format: accounts/{account_id}
+   * Example: "accounts/1000"
+   * 
+ * + * string account = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); + + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for the account referred to in this account summary.
+   * 
+ * + * string display_name = 3; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + java.util.List getPropertySummariesList(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + com.google.analytics.admin.v1alpha.PropertySummary getPropertySummaries(int index); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + int getPropertySummariesCount(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + java.util.List + getPropertySummariesOrBuilderList(); + /** + * + * + *
+   * List of summaries for child accounts of this account.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.PropertySummary property_summaries = 4; + */ + com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder getPropertySummariesOrBuilder( + int index); +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java index 75d62f1d..a9d6d42b 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java @@ -267,6 +267,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_GetDataSharingSettingsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_GetDataSharingSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -469,271 +477,281 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ha.GoogleAdsLink\022\027\n\017next_page_token\030\002 \001(" + "\t\"h\n\035GetDataSharingSettingsRequest\022G\n\004na" + "me\030\001 \001(\tB9\340A\002\372A3\n1analyticsadmin.googlea" - + "pis.com/DataSharingSettings2\264Q\n\025Analytic" - + "sAdminService\022\223\001\n\nGetAccount\0221.google.an" - + "alytics.admin.v1alpha.GetAccountRequest\032" - + "\'.google.analytics.admin.v1alpha.Account" - + "\")\202\323\344\223\002\034\022\032/v1alpha/{name=accounts/*}\332A\004n" - + "ame\022\224\001\n\014ListAccounts\0223.google.analytics." - + "admin.v1alpha.ListAccountsRequest\0324.goog" - + "le.analytics.admin.v1alpha.ListAccountsR" - + "esponse\"\031\202\323\344\223\002\023\022\021/v1alpha/accounts\022\210\001\n\rD" - + "eleteAccount\0224.google.analytics.admin.v1" - + "alpha.DeleteAccountRequest\032\026.google.prot" - + "obuf.Empty\")\202\323\344\223\002\034*\032/v1alpha/{name=accou" - + "nts/*}\332A\004name\022\271\001\n\rUpdateAccount\0224.google" - + ".analytics.admin.v1alpha.UpdateAccountRe" - + "quest\032\'.google.analytics.admin.v1alpha.A" - + "ccount\"I\202\323\344\223\002-2\"/v1alpha/{account.name=a" - + "ccounts/*}:\007account\332A\023account,update_mas" - + "k\022\314\001\n\026ProvisionAccountTicket\022=.google.an" - + "alytics.admin.v1alpha.ProvisionAccountTi" - + "cketRequest\032>.google.analytics.admin.v1a" - + "lpha.ProvisionAccountTicketResponse\"3\202\323\344" - + "\223\002-\"(/v1alpha/accounts:provisionAccountT" - + "icket:\001*\022\230\001\n\013GetProperty\0222.google.analyt" - + "ics.admin.v1alpha.GetPropertyRequest\032(.g" - + "oogle.analytics.admin.v1alpha.Property\"+" - + "\202\323\344\223\002\036\022\034/v1alpha/{name=properties/*}\332A\004n" - + "ame\022\234\001\n\016ListProperties\0225.google.analytic" - + "s.admin.v1alpha.ListPropertiesRequest\0326." - + "google.analytics.admin.v1alpha.ListPrope" - + "rtiesResponse\"\033\202\323\344\223\002\025\022\023/v1alpha/properti" - + "es\022\243\001\n\016CreateProperty\0225.google.analytics" - + ".admin.v1alpha.CreatePropertyRequest\032(.g" - + "oogle.analytics.admin.v1alpha.Property\"0" - + "\202\323\344\223\002\037\"\023/v1alpha/properties:\010property\332A\010" - + "property\022\214\001\n\016DeleteProperty\0225.google.ana" - + "lytics.admin.v1alpha.DeletePropertyReque" - + "st\032\026.google.protobuf.Empty\"+\202\323\344\223\002\036*\034/v1a" - + "lpha/{name=properties/*}\332A\004name\022\301\001\n\016Upda" - + "teProperty\0225.google.analytics.admin.v1al" - + "pha.UpdatePropertyRequest\032(.google.analy" - + "tics.admin.v1alpha.Property\"N\202\323\344\223\00212%/v1" - + "alpha/{property.name=properties/*}:\010prop" - + "erty\332A\024property,update_mask\022\316\001\n\013GetUserL" - + "ink\0222.google.analytics.admin.v1alpha.Get" - + "UserLinkRequest\032(.google.analytics.admin" - + ".v1alpha.UserLink\"a\202\323\344\223\002T\022&/v1alpha/{nam" - + "e=accounts/*/userLinks/*}Z*\022(/v1alpha/{n" - + "ame=properties/*/userLinks/*}\332A\004name\022\366\001\n" - + "\021BatchGetUserLinks\0228.google.analytics.ad" - + "min.v1alpha.BatchGetUserLinksRequest\0329.g" - + "oogle.analytics.admin.v1alpha.BatchGetUs" - + "erLinksResponse\"l\202\323\344\223\002f\022//v1alpha/{paren" - + "t=accounts/*}/userLinks:batchGetZ3\0221/v1a" - + "lpha/{parent=properties/*}/userLinks:bat" - + "chGet\022\341\001\n\rListUserLinks\0224.google.analyti" - + "cs.admin.v1alpha.ListUserLinksRequest\0325." - + "google.analytics.admin.v1alpha.ListUserL" - + "inksResponse\"c\202\323\344\223\002T\022&/v1alpha/{parent=a" - + "ccounts/*}/userLinksZ*\022(/v1alpha/{parent" - + "=properties/*}/userLinks\332A\006parent\022\355\001\n\016Au" - + "ditUserLinks\0225.google.analytics.admin.v1" - + "alpha.AuditUserLinksRequest\0326.google.ana" - + "lytics.admin.v1alpha.AuditUserLinksRespo" - + "nse\"l\202\323\344\223\002f\",/v1alpha/{parent=accounts/*" - + "}/userLinks:audit:\001*Z3\"./v1alpha/{parent" - + "=properties/*}/userLinks:audit:\001*\022\367\001\n\016Cr" - + "eateUserLink\0225.google.analytics.admin.v1" - + "alpha.CreateUserLinkRequest\032(.google.ana" - + "lytics.admin.v1alpha.UserLink\"\203\001\202\323\344\223\002j\"&" - + "/v1alpha/{parent=accounts/*}/userLinks:\t" - + "user_linkZ5\"(/v1alpha/{parent=properties" - + "/*}/userLinks:\tuser_link\332A\020parent,user_l" - + "ink\022\213\002\n\024BatchCreateUserLinks\022;.google.an" - + "alytics.admin.v1alpha.BatchCreateUserLin" - + "ksRequest\032<.google.analytics.admin.v1alp" - + "ha.BatchCreateUserLinksResponse\"x\202\323\344\223\002r\"" - + "2/v1alpha/{parent=accounts/*}/userLinks:" - + "batchCreate:\001*Z9\"4/v1alpha/{parent=prope" - + "rties/*}/userLinks:batchCreate:\001*\022\204\002\n\016Up" - + "dateUserLink\0225.google.analytics.admin.v1" - + "alpha.UpdateUserLinkRequest\032(.google.ana" - + "lytics.admin.v1alpha.UserLink\"\220\001\202\323\344\223\002~20" - + "/v1alpha/{user_link.name=accounts/*/user" - + "Links/*}:\tuser_linkZ?22/v1alpha/{user_li" - + "nk.name=properties/*/userLinks/*}:\tuser_" - + "link\332A\tuser_link\022\213\002\n\024BatchUpdateUserLink" - + "s\022;.google.analytics.admin.v1alpha.Batch" - + "UpdateUserLinksRequest\032<.google.analytic" - + "s.admin.v1alpha.BatchUpdateUserLinksResp" - + "onse\"x\202\323\344\223\002r\"2/v1alpha/{parent=accounts/" - + "*}/userLinks:batchUpdate:\001*Z9\"4/v1alpha/" - + "{parent=properties/*}/userLinks:batchUpd" - + "ate:\001*\022\302\001\n\016DeleteUserLink\0225.google.analy" - + "tics.admin.v1alpha.DeleteUserLinkRequest" - + "\032\026.google.protobuf.Empty\"a\202\323\344\223\002T*&/v1alp" - + "ha/{name=accounts/*/userLinks/*}Z**(/v1a" - + "lpha/{name=properties/*/userLinks/*}\332A\004n" - + "ame\022\345\001\n\024BatchDeleteUserLinks\022;.google.an" - + "alytics.admin.v1alpha.BatchDeleteUserLin" - + "ksRequest\032\026.google.protobuf.Empty\"x\202\323\344\223\002" - + "r\"2/v1alpha/{parent=accounts/*}/userLink" - + "s:batchDelete:\001*Z9\"4/v1alpha/{parent=pro" - + "perties/*}/userLinks:batchDelete:\001*\022\270\001\n\020" - + "GetWebDataStream\0227.google.analytics.admi" - + "n.v1alpha.GetWebDataStreamRequest\032-.goog" - + "le.analytics.admin.v1alpha.WebDataStream" - + "\"<\202\323\344\223\002/\022-/v1alpha/{name=properties/*/we" - + "bDataStreams/*}\332A\004name\022\247\001\n\023DeleteWebData" - + "Stream\022:.google.analytics.admin.v1alpha." - + "DeleteWebDataStreamRequest\032\026.google.prot" - + "obuf.Empty\"<\202\323\344\223\002/*-/v1alpha/{name=prope" - + "rties/*/webDataStreams/*}\332A\004name\022\366\001\n\023Upd" - + "ateWebDataStream\022:.google.analytics.admi" - + "n.v1alpha.UpdateWebDataStreamRequest\032-.g" - + "oogle.analytics.admin.v1alpha.WebDataStr" - + "eam\"t\202\323\344\223\002P2=/v1alpha/{web_data_stream.n" - + "ame=properties/*/webDataStreams/*}:\017web_" - + "data_stream\332A\033web_data_stream,update_mas" - + "k\022\341\001\n\023CreateWebDataStream\022:.google.analy" - + "tics.admin.v1alpha.CreateWebDataStreamRe" - + "quest\032-.google.analytics.admin.v1alpha.W" - + "ebDataStream\"_\202\323\344\223\002@\"-/v1alpha/{parent=p" - + "roperties/*}/webDataStreams:\017web_data_st" - + "ream\332A\026parent,web_data_stream\022\313\001\n\022ListWe" - + "bDataStreams\0229.google.analytics.admin.v1" - + "alpha.ListWebDataStreamsRequest\032:.google" - + ".analytics.admin.v1alpha.ListWebDataStre" - + "amsResponse\">\202\323\344\223\002/\022-/v1alpha/{parent=pr" - + "operties/*}/webDataStreams\332A\006parent\022\304\001\n\023" - + "GetIosAppDataStream\022:.google.analytics.a" - + "dmin.v1alpha.GetIosAppDataStreamRequest\032" - + "0.google.analytics.admin.v1alpha.IosAppD" - + "ataStream\"?\202\323\344\223\0022\0220/v1alpha/{name=proper" - + "ties/*/iosAppDataStreams/*}\332A\004name\022\260\001\n\026D" - + "eleteIosAppDataStream\022=.google.analytics" - + ".admin.v1alpha.DeleteIosAppDataStreamReq" - + "uest\032\026.google.protobuf.Empty\"?\202\323\344\223\0022*0/v" - + "1alpha/{name=properties/*/iosAppDataStre" - + "ams/*}\332A\004name\022\217\002\n\026UpdateIosAppDataStream" - + "\022=.google.analytics.admin.v1alpha.Update" - + "IosAppDataStreamRequest\0320.google.analyti" - + "cs.admin.v1alpha.IosAppDataStream\"\203\001\202\323\344\223" - + "\002[2D/v1alpha/{ios_app_data_stream.name=p" - + "roperties/*/iosAppDataStreams/*}:\023ios_ap" - + "p_data_stream\332A\037ios_app_data_stream,upda" - + "te_mask\022\365\001\n\026CreateIosAppDataStream\022=.goo" - + "gle.analytics.admin.v1alpha.CreateIosApp" - + "DataStreamRequest\0320.google.analytics.adm" - + "in.v1alpha.IosAppDataStream\"j\202\323\344\223\002G\"0/v1" - + "alpha/{parent=properties/*}/iosAppDataSt" - + "reams:\023ios_app_data_stream\332A\032parent,ios_" - + "app_data_stream\022\327\001\n\025ListIosAppDataStream" - + "s\022<.google.analytics.admin.v1alpha.ListI" - + "osAppDataStreamsRequest\032=.google.analyti" - + "cs.admin.v1alpha.ListIosAppDataStreamsRe" - + "sponse\"A\202\323\344\223\0022\0220/v1alpha/{parent=propert" - + "ies/*}/iosAppDataStreams\332A\006parent\022\324\001\n\027Ge" - + "tAndroidAppDataStream\022>.google.analytics" - + ".admin.v1alpha.GetAndroidAppDataStreamRe" - + "quest\0324.google.analytics.admin.v1alpha.A" - + "ndroidAppDataStream\"C\202\323\344\223\0026\0224/v1alpha/{n" - + "ame=properties/*/androidAppDataStreams/*" - + "}\332A\004name\022\274\001\n\032DeleteAndroidAppDataStream\022" - + "A.google.analytics.admin.v1alpha.DeleteA" - + "ndroidAppDataStreamRequest\032\026.google.prot" - + "obuf.Empty\"C\202\323\344\223\0026*4/v1alpha/{name=prope" - + "rties/*/androidAppDataStreams/*}\332A\004name\022" - + "\253\002\n\032UpdateAndroidAppDataStream\022A.google." - + "analytics.admin.v1alpha.UpdateAndroidApp" - + "DataStreamRequest\0324.google.analytics.adm" - + "in.v1alpha.AndroidAppDataStream\"\223\001\202\323\344\223\002g" - + "2L/v1alpha/{android_app_data_stream.name" - + "=properties/*/androidAppDataStreams/*}:\027" - + "android_app_data_stream\332A#android_app_da" - + "ta_stream,update_mask\022\215\002\n\032CreateAndroidA" - + "ppDataStream\022A.google.analytics.admin.v1" - + "alpha.CreateAndroidAppDataStreamRequest\032" - + "4.google.analytics.admin.v1alpha.Android" - + "AppDataStream\"v\202\323\344\223\002O\"4/v1alpha/{parent=" - + "properties/*}/androidAppDataStreams:\027and" - + "roid_app_data_stream\332A\036parent,android_ap" - + "p_data_stream\022\347\001\n\031ListAndroidAppDataStre" - + "ams\022@.google.analytics.admin.v1alpha.Lis" - + "tAndroidAppDataStreamsRequest\032A.google.a" + + "pis.com/DataSharingSettings\"D\n\033ListAccou" + + "ntSummariesRequest\022\021\n\tpage_size\030\001 \001(\005\022\022\n" + + "\npage_token\030\002 \001(\t\"\202\001\n\034ListAccountSummari" + + "esResponse\022I\n\021account_summaries\030\001 \003(\0132.." + + "google.analytics.admin.v1alpha.AccountSu" + + "mmary\022\027\n\017next_page_token\030\002 \001(\t2\353R\n\025Analy" + + "ticsAdminService\022\223\001\n\nGetAccount\0221.google" + + ".analytics.admin.v1alpha.GetAccountReque" + + "st\032\'.google.analytics.admin.v1alpha.Acco" + + "unt\")\202\323\344\223\002\034\022\032/v1alpha/{name=accounts/*}\332" + + "A\004name\022\224\001\n\014ListAccounts\0223.google.analyti" + + "cs.admin.v1alpha.ListAccountsRequest\0324.g" + + "oogle.analytics.admin.v1alpha.ListAccoun" + + "tsResponse\"\031\202\323\344\223\002\023\022\021/v1alpha/accounts\022\210\001" + + "\n\rDeleteAccount\0224.google.analytics.admin" + + ".v1alpha.DeleteAccountRequest\032\026.google.p" + + "rotobuf.Empty\")\202\323\344\223\002\034*\032/v1alpha/{name=ac" + + "counts/*}\332A\004name\022\271\001\n\rUpdateAccount\0224.goo" + + "gle.analytics.admin.v1alpha.UpdateAccoun" + + "tRequest\032\'.google.analytics.admin.v1alph" + + "a.Account\"I\202\323\344\223\002-2\"/v1alpha/{account.nam" + + "e=accounts/*}:\007account\332A\023account,update_" + + "mask\022\314\001\n\026ProvisionAccountTicket\022=.google" + + ".analytics.admin.v1alpha.ProvisionAccoun" + + "tTicketRequest\032>.google.analytics.admin." + + "v1alpha.ProvisionAccountTicketResponse\"3" + + "\202\323\344\223\002-\"(/v1alpha/accounts:provisionAccou" + + "ntTicket:\001*\022\264\001\n\024ListAccountSummaries\022;.g" + + "oogle.analytics.admin.v1alpha.ListAccoun" + + "tSummariesRequest\032<.google.analytics.adm" + + "in.v1alpha.ListAccountSummariesResponse\"" + + "!\202\323\344\223\002\033\022\031/v1alpha/accountSummaries\022\230\001\n\013G" + + "etProperty\0222.google.analytics.admin.v1al" + + "pha.GetPropertyRequest\032(.google.analytic" + + "s.admin.v1alpha.Property\"+\202\323\344\223\002\036\022\034/v1alp" + + "ha/{name=properties/*}\332A\004name\022\234\001\n\016ListPr" + + "operties\0225.google.analytics.admin.v1alph" + + "a.ListPropertiesRequest\0326.google.analyti" + + "cs.admin.v1alpha.ListPropertiesResponse\"" + + "\033\202\323\344\223\002\025\022\023/v1alpha/properties\022\243\001\n\016CreateP" + + "roperty\0225.google.analytics.admin.v1alpha" + + ".CreatePropertyRequest\032(.google.analytic" + + "s.admin.v1alpha.Property\"0\202\323\344\223\002\037\"\023/v1alp" + + "ha/properties:\010property\332A\010property\022\214\001\n\016D" + + "eleteProperty\0225.google.analytics.admin.v" + + "1alpha.DeletePropertyRequest\032\026.google.pr" + + "otobuf.Empty\"+\202\323\344\223\002\036*\034/v1alpha/{name=pro" + + "perties/*}\332A\004name\022\301\001\n\016UpdateProperty\0225.g" + + "oogle.analytics.admin.v1alpha.UpdateProp" + + "ertyRequest\032(.google.analytics.admin.v1a" + + "lpha.Property\"N\202\323\344\223\00212%/v1alpha/{propert" + + "y.name=properties/*}:\010property\332A\024propert" + + "y,update_mask\022\316\001\n\013GetUserLink\0222.google.a" + + "nalytics.admin.v1alpha.GetUserLinkReques" + + "t\032(.google.analytics.admin.v1alpha.UserL" + + "ink\"a\202\323\344\223\002T\022&/v1alpha/{name=accounts/*/u" + + "serLinks/*}Z*\022(/v1alpha/{name=properties" + + "/*/userLinks/*}\332A\004name\022\366\001\n\021BatchGetUserL" + + "inks\0228.google.analytics.admin.v1alpha.Ba" + + "tchGetUserLinksRequest\0329.google.analytic" + + "s.admin.v1alpha.BatchGetUserLinksRespons" + + "e\"l\202\323\344\223\002f\022//v1alpha/{parent=accounts/*}/" + + "userLinks:batchGetZ3\0221/v1alpha/{parent=p" + + "roperties/*}/userLinks:batchGet\022\341\001\n\rList" + + "UserLinks\0224.google.analytics.admin.v1alp" + + "ha.ListUserLinksRequest\0325.google.analyti" + + "cs.admin.v1alpha.ListUserLinksResponse\"c" + + "\202\323\344\223\002T\022&/v1alpha/{parent=accounts/*}/use" + + "rLinksZ*\022(/v1alpha/{parent=properties/*}" + + "/userLinks\332A\006parent\022\355\001\n\016AuditUserLinks\0225" + + ".google.analytics.admin.v1alpha.AuditUse" + + "rLinksRequest\0326.google.analytics.admin.v" + + "1alpha.AuditUserLinksResponse\"l\202\323\344\223\002f\",/" + + "v1alpha/{parent=accounts/*}/userLinks:au" + + "dit:\001*Z3\"./v1alpha/{parent=properties/*}" + + "/userLinks:audit:\001*\022\367\001\n\016CreateUserLink\0225" + + ".google.analytics.admin.v1alpha.CreateUs" + + "erLinkRequest\032(.google.analytics.admin.v" + + "1alpha.UserLink\"\203\001\202\323\344\223\002j\"&/v1alpha/{pare" + + "nt=accounts/*}/userLinks:\tuser_linkZ5\"(/" + + "v1alpha/{parent=properties/*}/userLinks:" + + "\tuser_link\332A\020parent,user_link\022\213\002\n\024BatchC" + + "reateUserLinks\022;.google.analytics.admin." + + "v1alpha.BatchCreateUserLinksRequest\032<.go" + + "ogle.analytics.admin.v1alpha.BatchCreate" + + "UserLinksResponse\"x\202\323\344\223\002r\"2/v1alpha/{par" + + "ent=accounts/*}/userLinks:batchCreate:\001*" + + "Z9\"4/v1alpha/{parent=properties/*}/userL" + + "inks:batchCreate:\001*\022\204\002\n\016UpdateUserLink\0225" + + ".google.analytics.admin.v1alpha.UpdateUs" + + "erLinkRequest\032(.google.analytics.admin.v" + + "1alpha.UserLink\"\220\001\202\323\344\223\002~20/v1alpha/{user" + + "_link.name=accounts/*/userLinks/*}:\tuser" + + "_linkZ?22/v1alpha/{user_link.name=proper" + + "ties/*/userLinks/*}:\tuser_link\332A\tuser_li" + + "nk\022\213\002\n\024BatchUpdateUserLinks\022;.google.ana" + + "lytics.admin.v1alpha.BatchUpdateUserLink" + + "sRequest\032<.google.analytics.admin.v1alph" + + "a.BatchUpdateUserLinksResponse\"x\202\323\344\223\002r\"2" + + "/v1alpha/{parent=accounts/*}/userLinks:b" + + "atchUpdate:\001*Z9\"4/v1alpha/{parent=proper" + + "ties/*}/userLinks:batchUpdate:\001*\022\302\001\n\016Del" + + "eteUserLink\0225.google.analytics.admin.v1a" + + "lpha.DeleteUserLinkRequest\032\026.google.prot" + + "obuf.Empty\"a\202\323\344\223\002T*&/v1alpha/{name=accou" + + "nts/*/userLinks/*}Z**(/v1alpha/{name=pro" + + "perties/*/userLinks/*}\332A\004name\022\345\001\n\024BatchD" + + "eleteUserLinks\022;.google.analytics.admin." + + "v1alpha.BatchDeleteUserLinksRequest\032\026.go" + + "ogle.protobuf.Empty\"x\202\323\344\223\002r\"2/v1alpha/{p" + + "arent=accounts/*}/userLinks:batchDelete:" + + "\001*Z9\"4/v1alpha/{parent=properties/*}/use" + + "rLinks:batchDelete:\001*\022\270\001\n\020GetWebDataStre" + + "am\0227.google.analytics.admin.v1alpha.GetW" + + "ebDataStreamRequest\032-.google.analytics.a" + + "dmin.v1alpha.WebDataStream\"<\202\323\344\223\002/\022-/v1a" + + "lpha/{name=properties/*/webDataStreams/*" + + "}\332A\004name\022\247\001\n\023DeleteWebDataStream\022:.googl" + + "e.analytics.admin.v1alpha.DeleteWebDataS" + + "treamRequest\032\026.google.protobuf.Empty\"<\202\323" + + "\344\223\002/*-/v1alpha/{name=properties/*/webDat" + + "aStreams/*}\332A\004name\022\366\001\n\023UpdateWebDataStre" + + "am\022:.google.analytics.admin.v1alpha.Upda" + + "teWebDataStreamRequest\032-.google.analytic" + + "s.admin.v1alpha.WebDataStream\"t\202\323\344\223\002P2=/" + + "v1alpha/{web_data_stream.name=properties" + + "/*/webDataStreams/*}:\017web_data_stream\332A\033" + + "web_data_stream,update_mask\022\341\001\n\023CreateWe" + + "bDataStream\022:.google.analytics.admin.v1a" + + "lpha.CreateWebDataStreamRequest\032-.google" + + ".analytics.admin.v1alpha.WebDataStream\"_" + + "\202\323\344\223\002@\"-/v1alpha/{parent=properties/*}/w" + + "ebDataStreams:\017web_data_stream\332A\026parent," + + "web_data_stream\022\313\001\n\022ListWebDataStreams\0229" + + ".google.analytics.admin.v1alpha.ListWebD" + + "ataStreamsRequest\032:.google.analytics.adm" + + "in.v1alpha.ListWebDataStreamsResponse\">\202" + + "\323\344\223\002/\022-/v1alpha/{parent=properties/*}/we" + + "bDataStreams\332A\006parent\022\304\001\n\023GetIosAppDataS" + + "tream\022:.google.analytics.admin.v1alpha.G" + + "etIosAppDataStreamRequest\0320.google.analy" + + "tics.admin.v1alpha.IosAppDataStream\"?\202\323\344" + + "\223\0022\0220/v1alpha/{name=properties/*/iosAppD" + + "ataStreams/*}\332A\004name\022\260\001\n\026DeleteIosAppDat" + + "aStream\022=.google.analytics.admin.v1alpha" + + ".DeleteIosAppDataStreamRequest\032\026.google." + + "protobuf.Empty\"?\202\323\344\223\0022*0/v1alpha/{name=p" + + "roperties/*/iosAppDataStreams/*}\332A\004name\022" + + "\217\002\n\026UpdateIosAppDataStream\022=.google.anal" + + "ytics.admin.v1alpha.UpdateIosAppDataStre" + + "amRequest\0320.google.analytics.admin.v1alp" + + "ha.IosAppDataStream\"\203\001\202\323\344\223\002[2D/v1alpha/{" + + "ios_app_data_stream.name=properties/*/io" + + "sAppDataStreams/*}:\023ios_app_data_stream\332" + + "A\037ios_app_data_stream,update_mask\022\365\001\n\026Cr" + + "eateIosAppDataStream\022=.google.analytics." + + "admin.v1alpha.CreateIosAppDataStreamRequ" + + "est\0320.google.analytics.admin.v1alpha.Ios" + + "AppDataStream\"j\202\323\344\223\002G\"0/v1alpha/{parent=" + + "properties/*}/iosAppDataStreams:\023ios_app" + + "_data_stream\332A\032parent,ios_app_data_strea" + + "m\022\327\001\n\025ListIosAppDataStreams\022<.google.ana" + + "lytics.admin.v1alpha.ListIosAppDataStrea" + + "msRequest\032=.google.analytics.admin.v1alp" + + "ha.ListIosAppDataStreamsResponse\"A\202\323\344\223\0022" + + "\0220/v1alpha/{parent=properties/*}/iosAppD" + + "ataStreams\332A\006parent\022\324\001\n\027GetAndroidAppDat" + + "aStream\022>.google.analytics.admin.v1alpha" + + ".GetAndroidAppDataStreamRequest\0324.google" + + ".analytics.admin.v1alpha.AndroidAppDataS" + + "tream\"C\202\323\344\223\0026\0224/v1alpha/{name=properties" + + "/*/androidAppDataStreams/*}\332A\004name\022\274\001\n\032D" + + "eleteAndroidAppDataStream\022A.google.analy" + + "tics.admin.v1alpha.DeleteAndroidAppDataS" + + "treamRequest\032\026.google.protobuf.Empty\"C\202\323" + + "\344\223\0026*4/v1alpha/{name=properties/*/androi" + + "dAppDataStreams/*}\332A\004name\022\253\002\n\032UpdateAndr" + + "oidAppDataStream\022A.google.analytics.admi" + + "n.v1alpha.UpdateAndroidAppDataStreamRequ" + + "est\0324.google.analytics.admin.v1alpha.And" + + "roidAppDataStream\"\223\001\202\323\344\223\002g2L/v1alpha/{an" + + "droid_app_data_stream.name=properties/*/" + + "androidAppDataStreams/*}:\027android_app_da" + + "ta_stream\332A#android_app_data_stream,upda" + + "te_mask\022\215\002\n\032CreateAndroidAppDataStream\022A" + + ".google.analytics.admin.v1alpha.CreateAn" + + "droidAppDataStreamRequest\0324.google.analy" + + "tics.admin.v1alpha.AndroidAppDataStream\"" + + "v\202\323\344\223\002O\"4/v1alpha/{parent=properties/*}/" + + "androidAppDataStreams:\027android_app_data_" + + "stream\332A\036parent,android_app_data_stream\022" + + "\347\001\n\031ListAndroidAppDataStreams\022@.google.a" + "nalytics.admin.v1alpha.ListAndroidAppDat" - + "aStreamsResponse\"E\202\323\344\223\0026\0224/v1alpha/{pare" - + "nt=properties/*}/androidAppDataStreams\332A" - + "\006parent\022\376\001\n\036GetEnhancedMeasurementSettin" - + "gs\022E.google.analytics.admin.v1alpha.GetE" - + "nhancedMeasurementSettingsRequest\032;.goog" - + "le.analytics.admin.v1alpha.EnhancedMeasu" - + "rementSettings\"X\202\323\344\223\002K\022I/v1alpha/{name=p" - + "roperties/*/webDataStreams/*/enhancedMea" - + "surementSettings}\332A\004name\022\350\002\n!UpdateEnhan" - + "cedMeasurementSettings\022H.google.analytic" - + "s.admin.v1alpha.UpdateEnhancedMeasuremen" - + "tSettingsRequest\032;.google.analytics.admi" - + "n.v1alpha.EnhancedMeasurementSettings\"\273\001" - + "\202\323\344\223\002\210\0012g/v1alpha/{enhanced_measurement_" - + "settings.name=properties/*/webDataStream" - + "s/*/enhancedMeasurementSettings}:\035enhanc" - + "ed_measurement_settings\332A)enhanced_measu" - + "rement_settings,update_mask\022\331\001\n\022CreateFi" - + "rebaseLink\0229.google.analytics.admin.v1al" - + "pha.CreateFirebaseLinkRequest\032,.google.a" - + "nalytics.admin.v1alpha.FirebaseLink\"Z\202\323\344" - + "\223\002=\",/v1alpha/{parent=properties/*}/fire", - "baseLinks:\rfirebase_link\332A\024parent,fireba" - + "se_link\022\354\001\n\022UpdateFirebaseLink\0229.google." - + "analytics.admin.v1alpha.UpdateFirebaseLi" - + "nkRequest\032,.google.analytics.admin.v1alp" - + "ha.FirebaseLink\"m\202\323\344\223\002K2:/v1alpha/{fireb" - + "ase_link.name=properties/*/firebaseLinks" - + "/*}:\rfirebase_link\332A\031firebase_link,updat" - + "e_mask\022\244\001\n\022DeleteFirebaseLink\0229.google.a" - + "nalytics.admin.v1alpha.DeleteFirebaseLin" - + "kRequest\032\026.google.protobuf.Empty\";\202\323\344\223\002." - + "*,/v1alpha/{name=properties/*/firebaseLi" - + "nks/*}\332A\004name\022\307\001\n\021ListFirebaseLinks\0228.go" - + "ogle.analytics.admin.v1alpha.ListFirebas" - + "eLinksRequest\0329.google.analytics.admin.v" - + "1alpha.ListFirebaseLinksResponse\"=\202\323\344\223\002." - + "\022,/v1alpha/{parent=properties/*}/firebas" - + "eLinks\332A\006parent\022\306\001\n\020GetGlobalSiteTag\0227.g" - + "oogle.analytics.admin.v1alpha.GetGlobalS" - + "iteTagRequest\032-.google.analytics.admin.v" - + "1alpha.GlobalSiteTag\"J\202\323\344\223\002=\022;/v1alpha/{" - + "name=properties/*/webDataStreams/*/globa" - + "lSiteTag}\332A\004name\022\341\001\n\023CreateGoogleAdsLink" - + "\022:.google.analytics.admin.v1alpha.Create" - + "GoogleAdsLinkRequest\032-.google.analytics." - + "admin.v1alpha.GoogleAdsLink\"_\202\323\344\223\002@\"-/v1" - + "alpha/{parent=properties/*}/googleAdsLin" - + "ks:\017google_ads_link\332A\026parent,google_ads_" - + "link\022\366\001\n\023UpdateGoogleAdsLink\022:.google.an" - + "alytics.admin.v1alpha.UpdateGoogleAdsLin" - + "kRequest\032-.google.analytics.admin.v1alph" - + "a.GoogleAdsLink\"t\202\323\344\223\002P2=/v1alpha/{googl" - + "e_ads_link.name=properties/*/googleAdsLi" - + "nks/*}:\017google_ads_link\332A\033google_ads_lin" - + "k,update_mask\022\247\001\n\023DeleteGoogleAdsLink\022:." - + "google.analytics.admin.v1alpha.DeleteGoo" - + "gleAdsLinkRequest\032\026.google.protobuf.Empt" - + "y\"<\202\323\344\223\002/*-/v1alpha/{name=properties/*/g" - + "oogleAdsLinks/*}\332A\004name\022\313\001\n\022ListGoogleAd" - + "sLinks\0229.google.analytics.admin.v1alpha." - + "ListGoogleAdsLinksRequest\032:.google.analy" - + "tics.admin.v1alpha.ListGoogleAdsLinksRes" - + "ponse\">\202\323\344\223\002/\022-/v1alpha/{parent=properti" - + "es/*}/googleAdsLinks\332A\006parent\022\313\001\n\026GetDat" - + "aSharingSettings\022=.google.analytics.admi" - + "n.v1alpha.GetDataSharingSettingsRequest\032" - + "3.google.analytics.admin.v1alpha.DataSha" - + "ringSettings\"=\202\323\344\223\0020\022./v1alpha/{name=acc" - + "ounts/*/dataSharingSettings}\332A\004name\032\374\001\312A" - + "\035analyticsadmin.googleapis.com\322A\330\001https:" - + "//www.googleapis.com/auth/analytics.edit" - + ",https://www.googleapis.com/auth/analyti" - + "cs.manage.users,https://www.googleapis.c" - + "om/auth/analytics.manage.users.readonly," - + "https://www.googleapis.com/auth/analytic" - + "s.readonlyB\200\001\n\"com.google.analytics.admi" - + "n.v1alphaB\023AnalyticsAdminProtoP\001ZCgoogle" - + ".golang.org/genproto/googleapis/analytic" - + "s/admin/v1alpha;adminb\006proto3" + + "aStreamsRequest\032A.google.analytics.admin" + + ".v1alpha.ListAndroidAppDataStreamsRespon" + + "se\"E\202\323\344\223\0026\0224/v1alpha/{parent=properties/" + + "*}/androidAppDataStreams\332A\006parent\022\376\001\n\036Ge" + + "tEnhancedMeasurementSettings\022E.google.an" + + "alytics.admin.v1alpha.GetEnhancedMeasure" + + "mentSettingsRequest\032;.google.analytics.a" + + "dmin.v1alpha.EnhancedMeasurementSettings" + + "\"X\202\323\344\223\002K\022I/v1alpha/{name=properties/*/we" + + "bDataStreams/*/enhancedMeasurementSettin" + + "gs}\332A\004name\022\350\002\n!UpdateEnhancedMeasurement" + + "Settings\022H.google.analytics.admin.v1alph" + + "a.UpdateEnhancedMeasurementSettingsReque" + + "st\032;.google.analytics.admin.v1alpha.Enha", + "ncedMeasurementSettings\"\273\001\202\323\344\223\002\210\0012g/v1al" + + "pha/{enhanced_measurement_settings.name=" + + "properties/*/webDataStreams/*/enhancedMe" + + "asurementSettings}:\035enhanced_measurement" + + "_settings\332A)enhanced_measurement_setting" + + "s,update_mask\022\331\001\n\022CreateFirebaseLink\0229.g" + + "oogle.analytics.admin.v1alpha.CreateFire" + + "baseLinkRequest\032,.google.analytics.admin" + + ".v1alpha.FirebaseLink\"Z\202\323\344\223\002=\",/v1alpha/" + + "{parent=properties/*}/firebaseLinks:\rfir" + + "ebase_link\332A\024parent,firebase_link\022\354\001\n\022Up" + + "dateFirebaseLink\0229.google.analytics.admi" + + "n.v1alpha.UpdateFirebaseLinkRequest\032,.go" + + "ogle.analytics.admin.v1alpha.FirebaseLin" + + "k\"m\202\323\344\223\002K2:/v1alpha/{firebase_link.name=" + + "properties/*/firebaseLinks/*}:\rfirebase_" + + "link\332A\031firebase_link,update_mask\022\244\001\n\022Del" + + "eteFirebaseLink\0229.google.analytics.admin" + + ".v1alpha.DeleteFirebaseLinkRequest\032\026.goo" + + "gle.protobuf.Empty\";\202\323\344\223\002.*,/v1alpha/{na" + + "me=properties/*/firebaseLinks/*}\332A\004name\022" + + "\307\001\n\021ListFirebaseLinks\0228.google.analytics" + + ".admin.v1alpha.ListFirebaseLinksRequest\032" + + "9.google.analytics.admin.v1alpha.ListFir" + + "ebaseLinksResponse\"=\202\323\344\223\002.\022,/v1alpha/{pa" + + "rent=properties/*}/firebaseLinks\332A\006paren" + + "t\022\306\001\n\020GetGlobalSiteTag\0227.google.analytic" + + "s.admin.v1alpha.GetGlobalSiteTagRequest\032" + + "-.google.analytics.admin.v1alpha.GlobalS" + + "iteTag\"J\202\323\344\223\002=\022;/v1alpha/{name=propertie" + + "s/*/webDataStreams/*/globalSiteTag}\332A\004na" + + "me\022\341\001\n\023CreateGoogleAdsLink\022:.google.anal" + + "ytics.admin.v1alpha.CreateGoogleAdsLinkR" + + "equest\032-.google.analytics.admin.v1alpha." + + "GoogleAdsLink\"_\202\323\344\223\002@\"-/v1alpha/{parent=" + + "properties/*}/googleAdsLinks:\017google_ads" + + "_link\332A\026parent,google_ads_link\022\366\001\n\023Updat" + + "eGoogleAdsLink\022:.google.analytics.admin." + + "v1alpha.UpdateGoogleAdsLinkRequest\032-.goo" + + "gle.analytics.admin.v1alpha.GoogleAdsLin" + + "k\"t\202\323\344\223\002P2=/v1alpha/{google_ads_link.nam" + + "e=properties/*/googleAdsLinks/*}:\017google" + + "_ads_link\332A\033google_ads_link,update_mask\022" + + "\247\001\n\023DeleteGoogleAdsLink\022:.google.analyti" + + "cs.admin.v1alpha.DeleteGoogleAdsLinkRequ" + + "est\032\026.google.protobuf.Empty\"<\202\323\344\223\002/*-/v1" + + "alpha/{name=properties/*/googleAdsLinks/" + + "*}\332A\004name\022\313\001\n\022ListGoogleAdsLinks\0229.googl" + + "e.analytics.admin.v1alpha.ListGoogleAdsL" + + "inksRequest\032:.google.analytics.admin.v1a" + + "lpha.ListGoogleAdsLinksResponse\">\202\323\344\223\002/\022" + + "-/v1alpha/{parent=properties/*}/googleAd" + + "sLinks\332A\006parent\022\313\001\n\026GetDataSharingSettin" + + "gs\022=.google.analytics.admin.v1alpha.GetD" + + "ataSharingSettingsRequest\0323.google.analy" + + "tics.admin.v1alpha.DataSharingSettings\"=" + + "\202\323\344\223\0020\022./v1alpha/{name=accounts/*/dataSh" + + "aringSettings}\332A\004name\032\374\001\312A\035analyticsadmi" + + "n.googleapis.com\322A\330\001https://www.googleap" + + "is.com/auth/analytics.edit,https://www.g" + + "oogleapis.com/auth/analytics.manage.user" + + "s,https://www.googleapis.com/auth/analyt" + + "ics.manage.users.readonly,https://www.go" + + "ogleapis.com/auth/analytics.readonlyB\200\001\n" + + "\"com.google.analytics.admin.v1alphaB\023Ana" + + "lyticsAdminProtoP\001ZCgoogle.golang.org/ge" + + "nproto/googleapis/analytics/admin/v1alph" + + "a;adminb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1227,6 +1245,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor, + new java.lang.String[] { + "PageSize", "PageToken", + }); + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor, + new java.lang.String[] { + "AccountSummaries", "NextPageToken", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java index bddbefa6..9fd6eba3 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java @@ -22,7 +22,7 @@ * * *
- * A link between an App+Web property and a Firebase project.
+ * A link between an GA4 property and a Firebase project.
  * 
* * Protobuf type {@code google.analytics.admin.v1alpha.FirebaseLink} @@ -305,7 +305,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-   * Maximum user access to the App + Web property allowed to admins of
+   * Maximum user access to the GA4 property allowed to admins of
    * the linked Firebase project.
    * 
* @@ -321,7 +321,7 @@ public int getMaximumUserAccessValue() { * * *
-   * Maximum user access to the App + Web property allowed to admins of
+   * Maximum user access to the GA4 property allowed to admins of
    * the linked Firebase project.
    * 
* @@ -538,7 +538,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A link between an App+Web property and a Firebase project.
+   * A link between an GA4 property and a Firebase project.
    * 
* * Protobuf type {@code google.analytics.admin.v1alpha.FirebaseLink} @@ -1162,7 +1162,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * Maximum user access to the App + Web property allowed to admins of
+     * Maximum user access to the GA4 property allowed to admins of
      * the linked Firebase project.
      * 
* @@ -1178,7 +1178,7 @@ public int getMaximumUserAccessValue() { * * *
-     * Maximum user access to the App + Web property allowed to admins of
+     * Maximum user access to the GA4 property allowed to admins of
      * the linked Firebase project.
      * 
* @@ -1197,7 +1197,7 @@ public Builder setMaximumUserAccessValue(int value) { * * *
-     * Maximum user access to the App + Web property allowed to admins of
+     * Maximum user access to the GA4 property allowed to admins of
      * the linked Firebase project.
      * 
* @@ -1218,7 +1218,7 @@ public com.google.analytics.admin.v1alpha.MaximumUserAccess getMaximumUserAccess * * *
-     * Maximum user access to the App + Web property allowed to admins of
+     * Maximum user access to the GA4 property allowed to admins of
      * the linked Firebase project.
      * 
* @@ -1241,7 +1241,7 @@ public Builder setMaximumUserAccess( * * *
-     * Maximum user access to the App + Web property allowed to admins of
+     * Maximum user access to the GA4 property allowed to admins of
      * the linked Firebase project.
      * 
* diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java index 888db5ba..547d198c 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java @@ -125,7 +125,7 @@ public interface FirebaseLinkOrBuilder * * *
-   * Maximum user access to the App + Web property allowed to admins of
+   * Maximum user access to the GA4 property allowed to admins of
    * the linked Firebase project.
    * 
* @@ -138,7 +138,7 @@ public interface FirebaseLinkOrBuilder * * *
-   * Maximum user access to the App + Web property allowed to admins of
+   * Maximum user access to the GA4 property allowed to admins of
    * the linked Firebase project.
    * 
* diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java index 1acb377b..3cd05c41 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java @@ -22,7 +22,7 @@ * * *
- * A link between an App+Web property and a Google Ads account.
+ * A link between an GA4 property and a Google Ads account.
  * 
* * Protobuf type {@code google.analytics.admin.v1alpha.GoogleAdsLink} @@ -802,7 +802,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A link between an App+Web property and a Google Ads account.
+   * A link between an GA4 property and a Google Ads account.
    * 
* * Protobuf type {@code google.analytics.admin.v1alpha.GoogleAdsLink} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequest.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequest.java new file mode 100644 index 00000000..3d135d36 --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequest.java @@ -0,0 +1,766 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Request message for ListAccountSummaries RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListAccountSummariesRequest} + */ +public final class ListAccountSummariesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListAccountSummariesRequest) + ListAccountSummariesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountSummariesRequest.newBuilder() to construct. + private ListAccountSummariesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountSummariesRequest() { + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountSummariesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountSummariesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + pageSize_ = input.readInt32(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.class, + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.Builder.class); + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 1; + private int pageSize_; + /** + * + * + *
+   * The maximum number of AccountSummary resources to return. The service may
+   * return fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (pageSize_ != 0) { + output.writeInt32(1, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.ListAccountSummariesRequest)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest other = + (com.google.analytics.admin.v1alpha.ListAccountSummariesRequest) obj; + + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest 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.admin.v1alpha.ListAccountSummariesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest 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.admin.v1alpha.ListAccountSummariesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest 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.admin.v1alpha.ListAccountSummariesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest 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.admin.v1alpha.ListAccountSummariesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListAccountSummaries RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListAccountSummariesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListAccountSummariesRequest) + com.google.analytics.admin.v1alpha.ListAccountSummariesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.class, + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesRequest_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesRequest + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesRequest build() { + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesRequest buildPartial() { + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest result = + new com.google.analytics.admin.v1alpha.ListAccountSummariesRequest(this); + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.ListAccountSummariesRequest) { + return mergeFrom((com.google.analytics.admin.v1alpha.ListAccountSummariesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.ListAccountSummariesRequest other) { + if (other + == com.google.analytics.admin.v1alpha.ListAccountSummariesRequest.getDefaultInstance()) + return this; + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.admin.v1alpha.ListAccountSummariesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1alpha.ListAccountSummariesRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of AccountSummary resources to return. The service may
+     * return fewer than this value, even if there are additional pages.
+     * If unspecified, at most 50 resources will be returned.
+     * The maximum value is 200; (higher values will be coerced to the maximum)
+     * 
+ * + * int32 page_size = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAccountSummaries` call.
+     * Provide this to retrieve the subsequent page.
+     * When paginating, all other parameters provided to `ListAccountSummaries`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 2; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListAccountSummariesRequest) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListAccountSummariesRequest) + private static final com.google.analytics.admin.v1alpha.ListAccountSummariesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListAccountSummariesRequest(); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountSummariesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountSummariesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequestOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequestOrBuilder.java new file mode 100644 index 00000000..d39388bf --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface ListAccountSummariesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListAccountSummariesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The maximum number of AccountSummary resources to return. The service may
+   * return fewer than this value, even if there are additional pages.
+   * If unspecified, at most 50 resources will be returned.
+   * The maximum value is 200; (higher values will be coerced to the maximum)
+   * 
+ * + * int32 page_size = 1; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAccountSummaries` call.
+   * Provide this to retrieve the subsequent page.
+   * When paginating, all other parameters provided to `ListAccountSummaries`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponse.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponse.java new file mode 100644 index 00000000..a509d951 --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponse.java @@ -0,0 +1,1160 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * Response message for ListAccountSummaries RPC.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListAccountSummariesResponse} + */ +public final class ListAccountSummariesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.ListAccountSummariesResponse) + ListAccountSummariesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAccountSummariesResponse.newBuilder() to construct. + private ListAccountSummariesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAccountSummariesResponse() { + accountSummaries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAccountSummariesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAccountSummariesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + accountSummaries_.add( + input.readMessage( + com.google.analytics.admin.v1alpha.AccountSummary.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = java.util.Collections.unmodifiableList(accountSummaries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.class, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.Builder.class); + } + + public static final int ACCOUNT_SUMMARIES_FIELD_NUMBER = 1; + private java.util.List accountSummaries_; + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public java.util.List + getAccountSummariesList() { + return accountSummaries_; + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public java.util.List + getAccountSummariesOrBuilderList() { + return accountSummaries_; + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public int getAccountSummariesCount() { + return accountSummaries_.size(); + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummary getAccountSummaries(int index) { + return accountSummaries_.get(index); + } + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + @java.lang.Override + public com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder getAccountSummariesOrBuilder( + int index) { + return accountSummaries_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < accountSummaries_.size(); i++) { + output.writeMessage(1, accountSummaries_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < accountSummaries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, accountSummaries_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.ListAccountSummariesResponse)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse other = + (com.google.analytics.admin.v1alpha.ListAccountSummariesResponse) obj; + + if (!getAccountSummariesList().equals(other.getAccountSummariesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAccountSummariesCount() > 0) { + hash = (37 * hash) + ACCOUNT_SUMMARIES_FIELD_NUMBER; + hash = (53 * hash) + getAccountSummariesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse 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.admin.v1alpha.ListAccountSummariesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse 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.admin.v1alpha.ListAccountSummariesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse 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.admin.v1alpha.ListAccountSummariesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse 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.admin.v1alpha.ListAccountSummariesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListAccountSummaries RPC.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.ListAccountSummariesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.ListAccountSummariesResponse) + com.google.analytics.admin.v1alpha.ListAccountSummariesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.class, + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAccountSummariesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountSummariesBuilder_ == null) { + accountSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + accountSummariesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.AnalyticsAdminProto + .internal_static_google_analytics_admin_v1alpha_ListAccountSummariesResponse_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse + getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse build() { + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse buildPartial() { + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse result = + new com.google.analytics.admin.v1alpha.ListAccountSummariesResponse(this); + int from_bitField0_ = bitField0_; + if (accountSummariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = java.util.Collections.unmodifiableList(accountSummaries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accountSummaries_ = accountSummaries_; + } else { + result.accountSummaries_ = accountSummariesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.ListAccountSummariesResponse) { + return mergeFrom((com.google.analytics.admin.v1alpha.ListAccountSummariesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse other) { + if (other + == com.google.analytics.admin.v1alpha.ListAccountSummariesResponse.getDefaultInstance()) + return this; + if (accountSummariesBuilder_ == null) { + if (!other.accountSummaries_.isEmpty()) { + if (accountSummaries_.isEmpty()) { + accountSummaries_ = other.accountSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccountSummariesIsMutable(); + accountSummaries_.addAll(other.accountSummaries_); + } + onChanged(); + } + } else { + if (!other.accountSummaries_.isEmpty()) { + if (accountSummariesBuilder_.isEmpty()) { + accountSummariesBuilder_.dispose(); + accountSummariesBuilder_ = null; + accountSummaries_ = other.accountSummaries_; + bitField0_ = (bitField0_ & ~0x00000001); + accountSummariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccountSummariesFieldBuilder() + : null; + } else { + accountSummariesBuilder_.addAllMessages(other.accountSummaries_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.admin.v1alpha.ListAccountSummariesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1alpha.ListAccountSummariesResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List accountSummaries_ = + java.util.Collections.emptyList(); + + private void ensureAccountSummariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accountSummaries_ = + new java.util.ArrayList( + accountSummaries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.AccountSummary, + com.google.analytics.admin.v1alpha.AccountSummary.Builder, + com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder> + accountSummariesBuilder_; + + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesList() { + if (accountSummariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(accountSummaries_); + } else { + return accountSummariesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public int getAccountSummariesCount() { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.size(); + } else { + return accountSummariesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1alpha.AccountSummary getAccountSummaries(int index) { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.get(index); + } else { + return accountSummariesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder setAccountSummaries( + int index, com.google.analytics.admin.v1alpha.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.set(index, value); + onChanged(); + } else { + accountSummariesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder setAccountSummaries( + int index, com.google.analytics.admin.v1alpha.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.set(index, builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries(com.google.analytics.admin.v1alpha.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.add(value); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + int index, com.google.analytics.admin.v1alpha.AccountSummary value) { + if (accountSummariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccountSummariesIsMutable(); + accountSummaries_.add(index, value); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + com.google.analytics.admin.v1alpha.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.add(builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder addAccountSummaries( + int index, com.google.analytics.admin.v1alpha.AccountSummary.Builder builderForValue) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.add(index, builderForValue.build()); + onChanged(); + } else { + accountSummariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder addAllAccountSummaries( + java.lang.Iterable values) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accountSummaries_); + onChanged(); + } else { + accountSummariesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder clearAccountSummaries() { + if (accountSummariesBuilder_ == null) { + accountSummaries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accountSummariesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public Builder removeAccountSummaries(int index) { + if (accountSummariesBuilder_ == null) { + ensureAccountSummariesIsMutable(); + accountSummaries_.remove(index); + onChanged(); + } else { + accountSummariesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1alpha.AccountSummary.Builder getAccountSummariesBuilder( + int index) { + return getAccountSummariesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder getAccountSummariesOrBuilder( + int index) { + if (accountSummariesBuilder_ == null) { + return accountSummaries_.get(index); + } else { + return accountSummariesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesOrBuilderList() { + if (accountSummariesBuilder_ != null) { + return accountSummariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accountSummaries_); + } + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1alpha.AccountSummary.Builder addAccountSummariesBuilder() { + return getAccountSummariesFieldBuilder() + .addBuilder(com.google.analytics.admin.v1alpha.AccountSummary.getDefaultInstance()); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public com.google.analytics.admin.v1alpha.AccountSummary.Builder addAccountSummariesBuilder( + int index) { + return getAccountSummariesFieldBuilder() + .addBuilder( + index, com.google.analytics.admin.v1alpha.AccountSummary.getDefaultInstance()); + } + /** + * + * + *
+     * Account summaries of all accounts the caller has access to.
+     * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + public java.util.List + getAccountSummariesBuilderList() { + return getAccountSummariesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.AccountSummary, + com.google.analytics.admin.v1alpha.AccountSummary.Builder, + com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder> + getAccountSummariesFieldBuilder() { + if (accountSummariesBuilder_ == null) { + accountSummariesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.analytics.admin.v1alpha.AccountSummary, + com.google.analytics.admin.v1alpha.AccountSummary.Builder, + com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder>( + accountSummaries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accountSummaries_ = null; + } + return accountSummariesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.ListAccountSummariesResponse) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.ListAccountSummariesResponse) + private static final com.google.analytics.admin.v1alpha.ListAccountSummariesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.ListAccountSummariesResponse(); + } + + public static com.google.analytics.admin.v1alpha.ListAccountSummariesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAccountSummariesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAccountSummariesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.ListAccountSummariesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponseOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponseOrBuilder.java new file mode 100644 index 00000000..0d916959 --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/analytics_admin.proto + +package com.google.analytics.admin.v1alpha; + +public interface ListAccountSummariesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.ListAccountSummariesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + java.util.List getAccountSummariesList(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + com.google.analytics.admin.v1alpha.AccountSummary getAccountSummaries(int index); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + int getAccountSummariesCount(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + java.util.List + getAccountSummariesOrBuilderList(); + /** + * + * + *
+   * Account summaries of all accounts the caller has access to.
+   * 
+ * + * repeated .google.analytics.admin.v1alpha.AccountSummary account_summaries = 1; + */ + com.google.analytics.admin.v1alpha.AccountSummaryOrBuilder getAccountSummariesOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java index fcbef8d4..0a4fe0dd 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java @@ -22,7 +22,7 @@ * * *
- * A resource message representing a Google Analytics App+Web property.
+ * A resource message representing a Google Analytics GA4 property.
  * 
* * Protobuf type {@code google.analytics.admin.v1alpha.Property} @@ -865,7 +865,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A resource message representing a Google Analytics App+Web property.
+   * A resource message representing a Google Analytics GA4 property.
    * 
* * Protobuf type {@code google.analytics.admin.v1alpha.Property} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummary.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummary.java new file mode 100644 index 00000000..0eafb0fe --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummary.java @@ -0,0 +1,829 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +/** + * + * + *
+ * A virtual resource representing metadata for an GA4 property.
+ * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.PropertySummary} + */ +public final class PropertySummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.PropertySummary) + PropertySummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use PropertySummary.newBuilder() to construct. + private PropertySummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PropertySummary() { + property_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PropertySummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PropertySummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + property_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_PropertySummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.PropertySummary.class, + com.google.analytics.admin.v1alpha.PropertySummary.Builder.class); + } + + public static final int PROPERTY_FIELD_NUMBER = 1; + private volatile java.lang.Object property_; + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + @java.lang.Override + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Display name for the property referred to in this account summary.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Display name for the property referred to in this account summary.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPropertyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, property_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPropertyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, property_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.analytics.admin.v1alpha.PropertySummary)) { + return super.equals(obj); + } + com.google.analytics.admin.v1alpha.PropertySummary other = + (com.google.analytics.admin.v1alpha.PropertySummary) obj; + + if (!getProperty().equals(other.getProperty())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROPERTY_FIELD_NUMBER; + hash = (53 * hash) + getProperty().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.analytics.admin.v1alpha.PropertySummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary 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.admin.v1alpha.PropertySummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary 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.admin.v1alpha.PropertySummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary 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.admin.v1alpha.PropertySummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary 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.admin.v1alpha.PropertySummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.analytics.admin.v1alpha.PropertySummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A virtual resource representing metadata for an GA4 property.
+   * 
+ * + * Protobuf type {@code google.analytics.admin.v1alpha.PropertySummary} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.PropertySummary) + com.google.analytics.admin.v1alpha.PropertySummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_PropertySummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.analytics.admin.v1alpha.PropertySummary.class, + com.google.analytics.admin.v1alpha.PropertySummary.Builder.class); + } + + // Construct using com.google.analytics.admin.v1alpha.PropertySummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + property_ = ""; + + displayName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.analytics.admin.v1alpha.ResourcesProto + .internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummary getDefaultInstanceForType() { + return com.google.analytics.admin.v1alpha.PropertySummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummary build() { + com.google.analytics.admin.v1alpha.PropertySummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummary buildPartial() { + com.google.analytics.admin.v1alpha.PropertySummary result = + new com.google.analytics.admin.v1alpha.PropertySummary(this); + result.property_ = property_; + result.displayName_ = displayName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.analytics.admin.v1alpha.PropertySummary) { + return mergeFrom((com.google.analytics.admin.v1alpha.PropertySummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.analytics.admin.v1alpha.PropertySummary other) { + if (other == com.google.analytics.admin.v1alpha.PropertySummary.getDefaultInstance()) + return this; + if (!other.getProperty().isEmpty()) { + property_ = other.property_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.analytics.admin.v1alpha.PropertySummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.analytics.admin.v1alpha.PropertySummary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object property_ = ""; + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + public java.lang.String getProperty() { + java.lang.Object ref = property_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + property_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + public com.google.protobuf.ByteString getPropertyBytes() { + java.lang.Object ref = property_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + property_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The property to set. + * @return This builder for chaining. + */ + public Builder setProperty(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + property_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearProperty() { + + property_ = getDefaultInstance().getProperty(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of property referred to by this property summary
+     * Format: properties/{property_id}
+     * Example: "properties/1000"
+     * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for property to set. + * @return This builder for chaining. + */ + public Builder setPropertyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + property_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Display name for the property referred to in this account summary.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Display name for the property referred to in this account summary.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Display name for the property referred to in this account summary.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the property referred to in this account summary.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Display name for the property referred to in this account summary.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.analytics.admin.v1alpha.PropertySummary) + } + + // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.PropertySummary) + private static final com.google.analytics.admin.v1alpha.PropertySummary DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.PropertySummary(); + } + + public static com.google.analytics.admin.v1alpha.PropertySummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PropertySummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PropertySummary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.analytics.admin.v1alpha.PropertySummary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummaryOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummaryOrBuilder.java new file mode 100644 index 00000000..c51e12ce --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummaryOrBuilder.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/analytics/admin/v1alpha/resources.proto + +package com.google.analytics.admin.v1alpha; + +public interface PropertySummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.analytics.admin.v1alpha.PropertySummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The property. + */ + java.lang.String getProperty(); + /** + * + * + *
+   * Resource name of property referred to by this property summary
+   * Format: properties/{property_id}
+   * Example: "properties/1000"
+   * 
+ * + * string property = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for property. + */ + com.google.protobuf.ByteString getPropertyBytes(); + + /** + * + * + *
+   * Display name for the property referred to in this account summary.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Display name for the property referred to in this account summary.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java index 41100dca..d4ed8197 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java @@ -75,6 +75,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_analytics_admin_v1alpha_DataSharingSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_analytics_admin_v1alpha_DataSharingSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_AccountSummary_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_analytics_admin_v1alpha_PropertySummary_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -189,28 +197,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ng_with_others_enabled\030\006 \001(\010:^\352A[\n1analy" + "ticsadmin.googleapis.com/DataSharingSett" + "ings\022&accounts/{account}/dataSharingSett" - + "ings*\252\004\n\020IndustryCategory\022!\n\035INDUSTRY_CA" - + "TEGORY_UNSPECIFIED\020\000\022\016\n\nAUTOMOTIVE\020\001\022#\n\037" - + "BUSINESS_AND_INDUSTRIAL_MARKETS\020\002\022\013\n\007FIN" - + "ANCE\020\003\022\016\n\nHEALTHCARE\020\004\022\016\n\nTECHNOLOGY\020\005\022\n" - + "\n\006TRAVEL\020\006\022\t\n\005OTHER\020\007\022\032\n\026ARTS_AND_ENTERT" - + "AINMENT\020\010\022\026\n\022BEAUTY_AND_FITNESS\020\t\022\030\n\024BOO" - + "KS_AND_LITERATURE\020\n\022\022\n\016FOOD_AND_DRINK\020\013\022" - + "\t\n\005GAMES\020\014\022\027\n\023HOBBIES_AND_LEISURE\020\r\022\023\n\017H" - + "OME_AND_GARDEN\020\016\022\030\n\024INTERNET_AND_TELECOM" - + "\020\017\022\026\n\022LAW_AND_GOVERNMENT\020\020\022\010\n\004NEWS\020\021\022\026\n\022" - + "ONLINE_COMMUNITIES\020\022\022\026\n\022PEOPLE_AND_SOCIE" - + "TY\020\023\022\024\n\020PETS_AND_ANIMALS\020\024\022\017\n\013REAL_ESTAT" - + "E\020\025\022\r\n\tREFERENCE\020\026\022\013\n\007SCIENCE\020\027\022\n\n\006SPORT" - + "S\020\030\022\026\n\022JOBS_AND_EDUCATION\020\031\022\014\n\010SHOPPING\020" - + "\032*\247\001\n\021MaximumUserAccess\022#\n\037MAXIMUM_USER_" - + "ACCESS_UNSPECIFIED\020\000\022\r\n\tNO_ACCESS\020\001\022\024\n\020R" - + "EAD_AND_ANALYZE\020\002\022\"\n\036EDITOR_WITHOUT_LINK" - + "_MANAGEMENT\020\003\022$\n EDITOR_INCLUDING_LINK_M" - + "ANAGEMENT\020\004B{\n\"com.google.analytics.admi" - + "n.v1alphaB\016ResourcesProtoP\001ZCgoogle.gola" - + "ng.org/genproto/googleapis/analytics/adm" - + "in/v1alpha;adminb\006proto3" + + "ings\"\225\002\n\016AccountSummary\022\014\n\004name\030\001 \001(\t\022;\n" + + "\007account\030\002 \001(\tB*\372A\'\n%analyticsadmin.goog" + + "leapis.com/Account\022\024\n\014display_name\030\003 \001(\t" + + "\022K\n\022property_summaries\030\004 \003(\0132/.google.an" + + "alytics.admin.v1alpha.PropertySummary:U\352" + + "AR\n,analyticsadmin.googleapis.com/Accoun" + + "tSummary\022\"accountSummaries/{account_summ" + + "ary}\"f\n\017PropertySummary\022=\n\010property\030\001 \001(" + + "\tB+\372A(\n&analyticsadmin.googleapis.com/Pr" + + "operty\022\024\n\014display_name\030\002 \001(\t*\252\004\n\020Industr" + + "yCategory\022!\n\035INDUSTRY_CATEGORY_UNSPECIFI" + + "ED\020\000\022\016\n\nAUTOMOTIVE\020\001\022#\n\037BUSINESS_AND_IND" + + "USTRIAL_MARKETS\020\002\022\013\n\007FINANCE\020\003\022\016\n\nHEALTH" + + "CARE\020\004\022\016\n\nTECHNOLOGY\020\005\022\n\n\006TRAVEL\020\006\022\t\n\005OT" + + "HER\020\007\022\032\n\026ARTS_AND_ENTERTAINMENT\020\010\022\026\n\022BEA" + + "UTY_AND_FITNESS\020\t\022\030\n\024BOOKS_AND_LITERATUR" + + "E\020\n\022\022\n\016FOOD_AND_DRINK\020\013\022\t\n\005GAMES\020\014\022\027\n\023HO" + + "BBIES_AND_LEISURE\020\r\022\023\n\017HOME_AND_GARDEN\020\016" + + "\022\030\n\024INTERNET_AND_TELECOM\020\017\022\026\n\022LAW_AND_GO" + + "VERNMENT\020\020\022\010\n\004NEWS\020\021\022\026\n\022ONLINE_COMMUNITI" + + "ES\020\022\022\026\n\022PEOPLE_AND_SOCIETY\020\023\022\024\n\020PETS_AND" + + "_ANIMALS\020\024\022\017\n\013REAL_ESTATE\020\025\022\r\n\tREFERENCE" + + "\020\026\022\013\n\007SCIENCE\020\027\022\n\n\006SPORTS\020\030\022\026\n\022JOBS_AND_" + + "EDUCATION\020\031\022\014\n\010SHOPPING\020\032*\247\001\n\021MaximumUse" + + "rAccess\022#\n\037MAXIMUM_USER_ACCESS_UNSPECIFI" + + "ED\020\000\022\r\n\tNO_ACCESS\020\001\022\024\n\020READ_AND_ANALYZE\020" + + "\002\022\"\n\036EDITOR_WITHOUT_LINK_MANAGEMENT\020\003\022$\n" + + " EDITOR_INCLUDING_LINK_MANAGEMENT\020\004B{\n\"c" + + "om.google.analytics.admin.v1alphaB\016Resou" + + "rcesProtoP\001ZCgoogle.golang.org/genproto/" + + "googleapis/analytics/admin/v1alpha;admin" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -360,10 +378,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SharingWithGoogleProductsEnabled", "SharingWithOthersEnabled", }); + internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_analytics_admin_v1alpha_AccountSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_AccountSummary_descriptor, + new java.lang.String[] { + "Name", "Account", "DisplayName", "PropertySummaries", + }); + internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_analytics_admin_v1alpha_PropertySummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_analytics_admin_v1alpha_PropertySummary_descriptor, + new java.lang.String[] { + "Property", "DisplayName", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); diff --git a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto index 60d503a9..64329904 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto +++ b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/analytics_admin.proto @@ -29,7 +29,7 @@ option java_multiple_files = true; option java_outer_classname = "AnalyticsAdminProto"; option java_package = "com.google.analytics.admin.v1alpha"; -// Service Interface for the Analytics Admin API (App+Web). +// Service Interface for the Analytics Admin API (GA4). service AnalyticsAdminService { option (google.api.default_host) = "analyticsadmin.googleapis.com"; option (google.api.oauth_scopes) = @@ -50,7 +50,7 @@ service AnalyticsAdminService { // Returns all accounts accessible by the caller. // - // Note that these accounts might not currently have App+Web properties. + // Note that these accounts might not currently have GA4 properties. // Soft-deleted (ie: "trashed") accounts are excluded by default. // Returns an empty list if no relevant accounts are found. rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { @@ -94,10 +94,17 @@ service AnalyticsAdminService { }; } - // Lookup for a single "App+Web" Property. + // Returns summaries of all accounts accessible by the caller. + rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) { + option (google.api.http) = { + get: "/v1alpha/accountSummaries" + }; + } + + // Lookup for a single "GA4" Property. // // Throws "Target not found" if no such property found, if property is not - // of the type "App+Web", or if caller does not have permissions to access it. + // of the type "GA4", or if caller does not have permissions to access it. rpc GetProperty(GetPropertyRequest) returns (Property) { option (google.api.http) = { get: "/v1alpha/{name=properties/*}" @@ -107,7 +114,7 @@ service AnalyticsAdminService { // Returns child Properties under the specified parent Account. // - // Only "App+Web" properties will be returned. + // Only "GA4" properties will be returned. // Properties will be excluded if the caller does not have access. // Soft-deleted (ie: "trashed") properties are excluded by default. // Returns an empty list if no relevant properties are found. @@ -117,7 +124,7 @@ service AnalyticsAdminService { }; } - // Creates an "App+Web" property with the specified location and attributes. + // Creates an "GA4" property with the specified location and attributes. rpc CreateProperty(CreatePropertyRequest) returns (Property) { option (google.api.http) = { post: "/v1alpha/properties" @@ -136,7 +143,7 @@ service AnalyticsAdminService { // will be permanently purged. // https://support.google.com/analytics/answer/6154772 // - // Returns an error if the target is not found, or is not an App+Web Property. + // Returns an error if the target is not found, or is not an GA4 Property. rpc DeleteProperty(DeletePropertyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1alpha/{name=properties/*}" @@ -1342,3 +1349,28 @@ message GetDataSharingSettingsRequest { } ]; } + +// Request message for ListAccountSummaries RPC. +message ListAccountSummariesRequest { + // The maximum number of AccountSummary resources to return. The service may + // return fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccountSummaries` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccountSummaries` + // must match the call that provided the page token. + string page_token = 2; +} + +// Response message for ListAccountSummaries RPC. +message ListAccountSummariesResponse { + // Account summaries of all accounts the caller has access to. + repeated AccountSummary account_summaries = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto index 79bc304c..6128c49d 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto +++ b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto @@ -56,7 +56,7 @@ message Account { bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// A resource message representing a Google Analytics App+Web property. +// A resource message representing a Google Analytics GA4 property. message Property { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/Property" @@ -354,7 +354,7 @@ message EnhancedMeasurementSettings { string excluded_domains = 18; } -// A link between an App+Web property and a Firebase project. +// A link between an GA4 property and a Firebase project. message FirebaseLink { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/FirebaseLink" @@ -376,7 +376,7 @@ message FirebaseLink { // Output only. Time when this FirebaseLink was originally created. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Maximum user access to the App + Web property allowed to admins of + // Maximum user access to the GA4 property allowed to admins of // the linked Firebase project. MaximumUserAccess maximum_user_access = 4; } @@ -394,7 +394,7 @@ message GlobalSiteTag { string snippet = 1 [(google.api.field_behavior) = IMMUTABLE]; } -// A link between an App+Web property and a Google Ads account. +// A link between an GA4 property and a Google Ads account. message GoogleAdsLink { option (google.api.resource) = { type: "analyticsadmin.googleapis.com/GoogleAdsLink" @@ -569,3 +569,43 @@ enum MaximumUserAccess { // the Firebase link. EDITOR_INCLUDING_LINK_MANAGEMENT = 4; } + +// A virtual resource representing an overview of an account and +// all its child GA4 properties. +message AccountSummary { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AccountSummary" + pattern: "accountSummaries/{account_summary}" + }; + + // Resource name for this account summary. + // Format: accountSummaries/{account_id} + // Example: "accountSummaries/1000" + string name = 1; + + // Resource name of account referred to by this account summary + // Format: accounts/{account_id} + // Example: "accounts/1000" + string account = 2 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + }]; + + // Display name for the account referred to in this account summary. + string display_name = 3; + + // List of summaries for child accounts of this account. + repeated PropertySummary property_summaries = 4; +} + +// A virtual resource representing metadata for an GA4 property. +message PropertySummary { + // Resource name of property referred to by this property summary + // Format: properties/{property_id} + // Example: "properties/1000" + string property = 1 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + }]; + + // Display name for the property referred to in this account summary. + string display_name = 2; +} diff --git a/renovate.json b/renovate.json index d21577af..1291cc6e 100644 --- a/renovate.json +++ b/renovate.json @@ -17,24 +17,6 @@ ], "versionScheme": "docker" }, - { - "packagePatterns": [ - "^com.google.api:gax", - "^com.google.auth:", - "^com.google.cloud:google-cloud-core", - "^io.grpc:", - "^com.google.guava:" - ], - "groupName": "core dependencies" - }, - { - "packagePatterns": [ - "^com.google.http-client:", - "^com.google.oauth-client:", - "^com.google.api-client:" - ], - "groupName": "core transport dependencies" - }, { "packagePatterns": [ "*" @@ -63,6 +45,16 @@ "semanticCommitType": "chore", "semanticCommitScope": "deps" }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, { "packagePatterns": [ "^com.google.cloud:google-cloud-" @@ -78,4 +70,4 @@ ], "semanticCommits": true, "masterIssue": true -} \ No newline at end of file +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index cc46a8f2..a7db2ade 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,20 +29,20 @@ com.google.analytics google-analytics-admin - 0.1.1 + 0.1.4 junit junit - 4.13 + 4.13.1 test com.google.truth truth - 1.0.1 + 1.1 test
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 05a2dd6d..3b7ebb36 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,20 +28,20 @@ com.google.analytics google-analytics-admin - 0.1.4 + 0.2.0 junit junit - 4.13 + 4.13.1 test com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f8321012..658a8fb0 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,19 +27,19 @@ com.google.analytics google-analytics-admin - 0.1.4 + 0.2.0 junit junit - 4.13 + 4.13.1 test com.google.truth truth - 1.0.1 + 1.1 test diff --git a/synth.metadata b/synth.metadata index 0d7cabed..439a746f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-admin.git", - "sha": "02a4b84a309b643241ac3dd88dffa9c95937f59a" + "sha": "d362c7401346e5b8562e25f7cfb28cd4935a8dc5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "84ebe7c62f4c0875e001752fa84e87e629a1d418", - "internalRef": "321243814" + "sha": "2131e2f755b3c2604e2d08de81a299fd7e377dcd", + "internalRef": "338527875" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "b19b401571e77192f8dd38eab5fb2300a0de9324" } } ], @@ -40,11 +40,15 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", + ".github/snippet-bot.yml", ".github/trusted-contribution.yml", + ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", @@ -112,6 +116,9 @@ "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Account.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountName.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountOrBuilder.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummary.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryOrBuilder.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminProto.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStream.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStreamName.java", @@ -203,6 +210,10 @@ "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStream.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamName.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamOrBuilder.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequest.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesRequestOrBuilder.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponse.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountSummariesResponseOrBuilder.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountsRequest.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountsRequestOrBuilder.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ListAccountsResponse.java", @@ -239,6 +250,8 @@ "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyName.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummary.java", + "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertySummaryOrBuilder.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ProvisionAccountTicketRequest.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ProvisionAccountTicketRequestOrBuilder.java", "proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ProvisionAccountTicketResponse.java", diff --git a/versions.txt b/versions.txt index 2dcf0e92..e54e6bed 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-analytics-admin:0.1.4:0.1.4 -proto-google-analytics-admin-v1alpha:0.1.4:0.1.4 -grpc-google-analytics-admin-v1alpha:0.1.4:0.1.4 \ No newline at end of file +google-analytics-admin:0.2.0:0.2.0 +proto-google-analytics-admin-v1alpha:0.2.0:0.2.0 +grpc-google-analytics-admin-v1alpha:0.2.0:0.2.0 \ No newline at end of file