diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index d6b8c155..4fbe90bf 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-admin.git", - "sha": "15ccf20bf20791d2a0192d67302e40a46a5cf432" + "sha": "9cb7aee44f8f414c7c1c4df2f07f71983d918950" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "67f09bf301083798e7220137723222eb00b8f88a" + "sha": "b259489b06b25f399768b74b8baa943991f38ea7" } } ] diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc9..7c8816a7 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68302207..def8b3a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,11 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index bca4448c..d17ea2c4 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -29,7 +29,7 @@ echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -60,6 +60,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -81,6 +82,7 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ + -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -110,8 +112,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-analytics-admin + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-analytics-admin fi echo "exiting with ${RETURN_CODE}" diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a56..0fb8c843 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2..00000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail -# Display commands being run. -set -x - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 52ae64dc..9b412b10 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { @@ -26,4 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 83cc0ac3..58b8f331 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 00000000..1f0870f2 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-analytics-admin/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 00000000..29b4cd3c --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-analytics-admin +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/CHANGELOG.md b/CHANGELOG.md index ccc97ba6..5e57b378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +### [0.3.1](https://www.github.com/googleapis/java-analytics-admin/compare/v0.3.0...v0.3.1) (2021-02-22) + + +### Bug Fixes + +* don't log downloads ([#168](https://www.github.com/googleapis/java-analytics-admin/issues/168)) ([a781d7d](https://www.github.com/googleapis/java-analytics-admin/commit/a781d7d77c3314456b9bdc7982f1ef89c7acd0e5)) + + +### Documentation + +* generate sample code in the Java microgenerator ([#152](https://www.github.com/googleapis/java-analytics-admin/issues/152)) ([62b6cd9](https://www.github.com/googleapis/java-analytics-admin/commit/62b6cd925df28035c247d67fbe86c5e46d810d4d)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#169](https://www.github.com/googleapis/java-analytics-admin/issues/169)) ([52b071b](https://www.github.com/googleapis/java-analytics-admin/commit/52b071b0f15d347510d722daacd071838c930249)) + ## [0.3.0](https://www.github.com/googleapis/java-analytics-admin/compare/v0.2.5...v0.3.0) (2021-01-19) diff --git a/LICENSE b/LICENSE index d6456956..261eeb9e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index af78e93c..78f404e6 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,18 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-admin - 0.2.5 + 0.3.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.analytics:google-analytics-admin:0.2.5' +compile 'com.google.analytics:google-analytics-admin:0.3.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.2.5" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.3.0" ``` ## Authentication diff --git a/google-analytics-admin-bom/pom.xml b/google-analytics-admin-bom/pom.xml index 0355298b..4992bab3 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.3.0 + 0.3.1 pom com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 Google Analytics Admin BOM @@ -68,17 +68,17 @@ com.google.analytics google-analytics-admin - 0.3.0 + 0.3.1 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.3.0 + 0.3.1 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.3.0 + 0.3.1 diff --git a/google-analytics-admin/pom.xml b/google-analytics-admin/pom.xml index a557e3e4..abe3fbff 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.3.0 + 0.3.1 jar Google Analytics Admin https://github.com/googleapis/java-analytics-admin @@ -11,7 +11,7 @@ com.google.analytics google-analytics-admin-parent - 0.3.0 + 0.3.1 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 29e56742..c9e82081 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 @@ -43,6 +43,14 @@ *

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

{@code
+ * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create()) {
+ *   AccountName name = AccountName.of("[ACCOUNT]");
+ *   Account response = analyticsAdminServiceClient.getAccount(name);
+ * }
+ * }
+ * *

Note: close() needs to be called on the AnalyticsAdminServiceClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -150,6 +158,16 @@ public AnalyticsAdminServiceStub getStub() { /** * Lookup for a single Account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName name = AccountName.of("[ACCOUNT]");
+   *   Account response = analyticsAdminServiceClient.getAccount(name);
+   * }
+   * }
+ * * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: * "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -164,6 +182,16 @@ public final Account getAccount(AccountName name) { /** * Lookup for a single Account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = AccountName.of("[ACCOUNT]").toString();
+   *   Account response = analyticsAdminServiceClient.getAccount(name);
+   * }
+   * }
+ * * @param name Required. The name of the account to lookup. Format: accounts/{account} Example: * "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -177,6 +205,17 @@ public final Account getAccount(String name) { /** * Lookup for a single Account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAccountRequest request =
+   *       GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   Account response = analyticsAdminServiceClient.getAccount(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -189,6 +228,18 @@ public final Account getAccount(GetAccountRequest request) { * Lookup for a single Account. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAccountRequest request =
+   *       GetAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getAccountCallable().futureCall(request);
+   *   // Do something.
+   *   Account response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAccountCallable() { return stub.getAccountCallable(); @@ -202,6 +253,23 @@ public final UnaryCallable getAccountCallable() { * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are * found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountsRequest request =
+   *       ListAccountsRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Account element : analyticsAdminServiceClient.listAccounts(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 */ @@ -218,6 +286,24 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) * found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountsRequest request =
+   *       ListAccountsRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Account element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAccountsPagedCallable() { @@ -233,6 +319,25 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) * found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListAccountsResponse response =
+   *         analyticsAdminServiceClient.listAccountsCallable().call(request);
+   *     for (Account element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAccountsCallable() { return stub.listAccountsCallable(); @@ -251,6 +356,16 @@ public final UnaryCallable listAccoun * *

Returns an error if the target is not found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName name = AccountName.of("[ACCOUNT]");
+   *   analyticsAdminServiceClient.deleteAccount(name);
+   * }
+   * }
+ * * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} * Example: "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -274,6 +389,16 @@ public final void deleteAccount(AccountName name) { * *

Returns an error if the target is not found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = AccountName.of("[ACCOUNT]").toString();
+   *   analyticsAdminServiceClient.deleteAccount(name);
+   * }
+   * }
+ * * @param name Required. The name of the Account to soft-delete. Format: accounts/{account} * Example: "accounts/100" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -296,6 +421,17 @@ public final void deleteAccount(String name) { * *

Returns an error if the target is not found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAccountRequest request =
+   *       DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   analyticsAdminServiceClient.deleteAccount(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -317,6 +453,18 @@ public final void deleteAccount(DeleteAccountRequest request) { *

Returns an error if the target is not found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAccountRequest request =
+   *       DeleteAccountRequest.newBuilder().setName(AccountName.of("[ACCOUNT]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteAccountCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteAccountCallable() { return stub.deleteAccountCallable(); @@ -326,6 +474,17 @@ public final UnaryCallable deleteAccountCallable() /** * Updates an account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Account account = Account.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Account response = analyticsAdminServiceClient.updateAccount(account, updateMask);
+   * }
+   * }
+ * * @param account Required. The account to update. The account's `name` field is used to identify * the account. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -343,6 +502,20 @@ public final Account updateAccount(Account account, FieldMask updateMask) { /** * Updates an account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAccountRequest request =
+   *       UpdateAccountRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Account response = analyticsAdminServiceClient.updateAccount(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -355,6 +528,21 @@ public final Account updateAccount(UpdateAccountRequest request) { * Updates an account. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAccountRequest request =
+   *       UpdateAccountRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateAccountCallable().futureCall(request);
+   *   // Do something.
+   *   Account response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateAccountCallable() { return stub.updateAccountCallable(); @@ -364,6 +552,21 @@ public final UnaryCallable updateAccountCallable( /** * Requests a ticket for creating an account. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ProvisionAccountTicketRequest request =
+   *       ProvisionAccountTicketRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setRedirectUri("redirectUri1970337776")
+   *           .build();
+   *   ProvisionAccountTicketResponse response =
+   *       analyticsAdminServiceClient.provisionAccountTicket(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -377,6 +580,21 @@ public final ProvisionAccountTicketResponse provisionAccountTicket( * Requests a ticket for creating an account. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ProvisionAccountTicketRequest request =
+   *       ProvisionAccountTicketRequest.newBuilder()
+   *           .setAccount(Account.newBuilder().build())
+   *           .setRedirectUri("redirectUri1970337776")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.provisionAccountTicketCallable().futureCall(request);
+   *   // Do something.
+   *   ProvisionAccountTicketResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable provisionAccountTicketCallable() { @@ -387,6 +605,23 @@ public final ProvisionAccountTicketResponse provisionAccountTicket( /** * Returns summaries of all accounts accessible by the caller. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request =
+   *       ListAccountSummariesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .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 */ @@ -400,6 +635,23 @@ public final ListAccountSummariesPagedResponse listAccountSummaries( * Returns summaries of all accounts accessible by the caller. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAccountSummariesRequest request =
+   *       ListAccountSummariesRequest.newBuilder()
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listAccountSummariesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AccountSummary element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAccountSummariesPagedCallable() { @@ -411,6 +663,25 @@ public final ListAccountSummariesPagedResponse listAccountSummaries( * Returns summaries of all accounts accessible by the caller. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListAccountSummariesResponse response =
+   *         analyticsAdminServiceClient.listAccountSummariesCallable().call(request);
+   *     for (AccountSummary element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAccountSummariesCallable() { @@ -421,6 +692,16 @@ public final ListAccountSummariesPagedResponse listAccountSummaries( /** * Lookup for a single "GA4" Property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName name = PropertyName.of("[PROPERTY]");
+   *   Property response = analyticsAdminServiceClient.getProperty(name);
+   * }
+   * }
+ * * @param name Required. The name of the property to lookup. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -435,6 +716,16 @@ public final Property getProperty(PropertyName name) { /** * Lookup for a single "GA4" Property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = PropertyName.of("[PROPERTY]").toString();
+   *   Property response = analyticsAdminServiceClient.getProperty(name);
+   * }
+   * }
+ * * @param name Required. The name of the property to lookup. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -448,6 +739,17 @@ public final Property getProperty(String name) { /** * Lookup for a single "GA4" Property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetPropertyRequest request =
+   *       GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
+   *   Property response = analyticsAdminServiceClient.getProperty(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -460,6 +762,18 @@ public final Property getProperty(GetPropertyRequest request) { * Lookup for a single "GA4" Property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetPropertyRequest request =
+   *       GetPropertyRequest.newBuilder().setName(PropertyName.of("[PROPERTY]").toString()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getPropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getPropertyCallable() { return stub.getPropertyCallable(); @@ -473,6 +787,24 @@ public final UnaryCallable getPropertyCallable() { * have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty * list if no relevant properties are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListPropertiesRequest request =
+   *       ListPropertiesRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   for (Property element : analyticsAdminServiceClient.listProperties(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 */ @@ -489,6 +821,25 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re * list if no relevant properties are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListPropertiesRequest request =
+   *       ListPropertiesRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setShowDeleted(true)
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Property element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPropertiesPagedCallable() { @@ -504,6 +855,25 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re * list if no relevant properties are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListPropertiesResponse response =
+   *         analyticsAdminServiceClient.listPropertiesCallable().call(request);
+   *     for (Property element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listPropertiesCallable() { @@ -514,6 +884,16 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re /** * Creates an "GA4" property with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Property property = Property.newBuilder().build();
+   *   Property response = analyticsAdminServiceClient.createProperty(property);
+   * }
+   * }
+ * * @param property Required. The property to create. Note: the supplied property must specify its * parent. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -528,6 +908,17 @@ public final Property createProperty(Property property) { /** * Creates an "GA4" property with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreatePropertyRequest request =
+   *       CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
+   *   Property response = analyticsAdminServiceClient.createProperty(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -540,6 +931,18 @@ public final Property createProperty(CreatePropertyRequest request) { * Creates an "GA4" property with the specified location and attributes. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreatePropertyRequest request =
+   *       CreatePropertyRequest.newBuilder().setProperty(Property.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createPropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createPropertyCallable() { return stub.createPropertyCallable(); @@ -558,6 +961,16 @@ public final UnaryCallable createPropertyCallab * *

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

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName name = PropertyName.of("[PROPERTY]");
+   *   analyticsAdminServiceClient.deleteProperty(name);
+   * }
+   * }
+ * * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -581,6 +994,16 @@ public final void deleteProperty(PropertyName name) { * *

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

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = PropertyName.of("[PROPERTY]").toString();
+   *   analyticsAdminServiceClient.deleteProperty(name);
+   * }
+   * }
+ * * @param name Required. The name of the Property to soft-delete. Format: properties/{property_id} * Example: "properties/1000" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -603,6 +1026,19 @@ public final void deleteProperty(String name) { * *

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

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeletePropertyRequest request =
+   *       DeletePropertyRequest.newBuilder()
+   *           .setName(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteProperty(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -624,6 +1060,20 @@ public final void deleteProperty(DeletePropertyRequest request) { *

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

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeletePropertyRequest request =
+   *       DeletePropertyRequest.newBuilder()
+   *           .setName(PropertyName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deletePropertyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deletePropertyCallable() { return stub.deletePropertyCallable(); @@ -633,6 +1083,17 @@ public final UnaryCallable deletePropertyCallable( /** * Updates a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   Property property = Property.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Property response = analyticsAdminServiceClient.updateProperty(property, updateMask);
+   * }
+   * }
+ * * @param property Required. The property to update. The property's `name` field is used to * identify the property to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -650,6 +1111,20 @@ public final Property updateProperty(Property property, FieldMask updateMask) { /** * Updates a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdatePropertyRequest request =
+   *       UpdatePropertyRequest.newBuilder()
+   *           .setProperty(Property.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Property response = analyticsAdminServiceClient.updateProperty(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -662,6 +1137,21 @@ public final Property updateProperty(UpdatePropertyRequest request) { * Updates a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdatePropertyRequest request =
+   *       UpdatePropertyRequest.newBuilder()
+   *           .setProperty(Property.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updatePropertyCallable().futureCall(request);
+   *   // Do something.
+   *   Property response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updatePropertyCallable() { return stub.updatePropertyCallable(); @@ -671,6 +1161,16 @@ public final UnaryCallable updatePropertyCallab /** * Gets information about a user's link to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
+   *   UserLink response = analyticsAdminServiceClient.getUserLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -684,6 +1184,16 @@ public final UserLink getUserLink(UserLinkName name) { /** * Gets information about a user's link to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString();
+   *   UserLink response = analyticsAdminServiceClient.getUserLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -696,6 +1206,19 @@ public final UserLink getUserLink(String name) { /** * Gets information about a user's link to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetUserLinkRequest request =
+   *       GetUserLinkRequest.newBuilder()
+   *           .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .build();
+   *   UserLink response = analyticsAdminServiceClient.getUserLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -708,6 +1231,20 @@ public final UserLink getUserLink(GetUserLinkRequest request) { * Gets information about a user's link to an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetUserLinkRequest request =
+   *       GetUserLinkRequest.newBuilder()
+   *           .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getUserLinkCallable().futureCall(request);
+   *   // Do something.
+   *   UserLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getUserLinkCallable() { return stub.getUserLinkCallable(); @@ -717,6 +1254,20 @@ public final UnaryCallable getUserLinkCallable() { /** * Gets information about multiple users' links to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchGetUserLinksRequest request =
+   *       BatchGetUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   BatchGetUserLinksResponse response = analyticsAdminServiceClient.batchGetUserLinks(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -729,6 +1280,21 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques * Gets information about multiple users' links to an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchGetUserLinksRequest request =
+   *       BatchGetUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllNames(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.batchGetUserLinksCallable().futureCall(request);
+   *   // Do something.
+   *   BatchGetUserLinksResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable batchGetUserLinksCallable() { @@ -739,6 +1305,18 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques /** * Lists all user links on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName parent = AccountName.of("[ACCOUNT]");
+   *   for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -754,6 +1332,18 @@ public final ListUserLinksPagedResponse listUserLinks(AccountName parent) { /** * Lists all user links on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -769,6 +1359,18 @@ public final ListUserLinksPagedResponse listUserLinks(PropertyName parent) { /** * Lists all user links on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString();
+   *   for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -781,6 +1383,23 @@ public final ListUserLinksPagedResponse listUserLinks(String parent) { /** * Lists all user links on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListUserLinksRequest request =
+   *       ListUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (UserLink element : analyticsAdminServiceClient.listUserLinks(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 */ @@ -793,6 +1412,24 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * Lists all user links on an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListUserLinksRequest request =
+   *       ListUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listUserLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (UserLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listUserLinksPagedCallable() { @@ -804,6 +1441,25 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque * Lists all user links on an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListUserLinksResponse response =
+   *         analyticsAdminServiceClient.listUserLinksCallable().call(request);
+   *     for (UserLink element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listUserLinksCallable() { return stub.listUserLinksCallable(); @@ -819,6 +1475,24 @@ public final UnaryCallable listUser * group/etc that gives them permissions, which is currently only usable/discoverable in the GA or * GMP UIs. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AuditUserLinksRequest request =
+   *       AuditUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AuditUserLink element :
+   *       analyticsAdminServiceClient.auditUserLinks(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 */ @@ -837,6 +1511,24 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * GMP UIs. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AuditUserLinksRequest request =
+   *       AuditUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.auditUserLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AuditUserLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable auditUserLinksPagedCallable() { @@ -854,6 +1546,25 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * GMP UIs. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     AuditUserLinksResponse response =
+   *         analyticsAdminServiceClient.auditUserLinksCallable().call(request);
+   *     for (AuditUserLink element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable auditUserLinksCallable() { @@ -868,6 +1579,17 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AccountName parent = AccountName.of("[ACCOUNT]");
+   *   UserLink userLink = UserLink.newBuilder().build();
+   *   UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink);
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -889,6 +1611,17 @@ public final UserLink createUserLink(AccountName parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   UserLink userLink = UserLink.newBuilder().build();
+   *   UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink);
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -910,6 +1643,17 @@ public final UserLink createUserLink(PropertyName parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString();
+   *   UserLink userLink = UserLink.newBuilder().build();
+   *   UserLink response = analyticsAdminServiceClient.createUserLink(parent, userLink);
+   * }
+   * }
+ * * @param parent Required. Example format: accounts/1234 * @param userLink Required. The user link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -928,6 +1672,21 @@ public final UserLink createUserLink(String parent, UserLink userLink) { * then the user's existing permissions will be unioned with the permissions specified in the new * UserLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateUserLinkRequest request =
+   *       CreateUserLinkRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setNotifyNewUser(true)
+   *           .setUserLink(UserLink.newBuilder().build())
+   *           .build();
+   *   UserLink response = analyticsAdminServiceClient.createUserLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -944,6 +1703,22 @@ public final UserLink createUserLink(CreateUserLinkRequest request) { * UserLink. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateUserLinkRequest request =
+   *       CreateUserLinkRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setNotifyNewUser(true)
+   *           .setUserLink(UserLink.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createUserLinkCallable().futureCall(request);
+   *   // Do something.
+   *   UserLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createUserLinkCallable() { return stub.createUserLinkCallable(); @@ -956,6 +1731,22 @@ public final UnaryCallable createUserLinkCallab *

This method is transactional. If any UserLink cannot be created, none of the UserLinks will * be created. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchCreateUserLinksRequest request =
+   *       BatchCreateUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setNotifyNewUsers(true)
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchCreateUserLinksResponse response =
+   *       analyticsAdminServiceClient.batchCreateUserLinks(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -972,6 +1763,22 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( * be created. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchCreateUserLinksRequest request =
+   *       BatchCreateUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .setNotifyNewUsers(true)
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.batchCreateUserLinksCallable().futureCall(request);
+   *   // Do something.
+   *   BatchCreateUserLinksResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable batchCreateUserLinksCallable() { @@ -982,6 +1789,16 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( /** * Updates a user link on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UserLink userLink = UserLink.newBuilder().build();
+   *   UserLink response = analyticsAdminServiceClient.updateUserLink(userLink);
+   * }
+   * }
+ * * @param userLink Required. The user link to update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -995,6 +1812,17 @@ public final UserLink updateUserLink(UserLink userLink) { /** * Updates a user link on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateUserLinkRequest request =
+   *       UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build();
+   *   UserLink response = analyticsAdminServiceClient.updateUserLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1007,6 +1835,18 @@ public final UserLink updateUserLink(UpdateUserLinkRequest request) { * Updates a user link on an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateUserLinkRequest request =
+   *       UpdateUserLinkRequest.newBuilder().setUserLink(UserLink.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateUserLinkCallable().futureCall(request);
+   *   // Do something.
+   *   UserLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateUserLinkCallable() { return stub.updateUserLinkCallable(); @@ -1016,6 +1856,21 @@ public final UnaryCallable updateUserLinkCallab /** * Updates information about multiple users' links to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchUpdateUserLinksRequest request =
+   *       BatchUpdateUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   BatchUpdateUserLinksResponse response =
+   *       analyticsAdminServiceClient.batchUpdateUserLinks(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1029,6 +1884,21 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( * Updates information about multiple users' links to an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchUpdateUserLinksRequest request =
+   *       BatchUpdateUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.batchUpdateUserLinksCallable().futureCall(request);
+   *   // Do something.
+   *   BatchUpdateUserLinksResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable batchUpdateUserLinksCallable() { @@ -1039,6 +1909,16 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( /** * Deletes a user link on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
+   *   analyticsAdminServiceClient.deleteUserLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1052,6 +1932,16 @@ public final void deleteUserLink(UserLinkName name) { /** * Deletes a user link on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString();
+   *   analyticsAdminServiceClient.deleteUserLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: accounts/1234/userLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1064,6 +1954,19 @@ public final void deleteUserLink(String name) { /** * Deletes a user link on an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteUserLinkRequest request =
+   *       DeleteUserLinkRequest.newBuilder()
+   *           .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteUserLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1076,6 +1979,20 @@ public final void deleteUserLink(DeleteUserLinkRequest request) { * Deletes a user link on an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteUserLinkRequest request =
+   *       DeleteUserLinkRequest.newBuilder()
+   *           .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteUserLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteUserLinkCallable() { return stub.deleteUserLinkCallable(); @@ -1085,6 +2002,20 @@ public final UnaryCallable deleteUserLinkCallable( /** * Deletes information about multiple users' links to an account or property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchDeleteUserLinksRequest request =
+   *       BatchDeleteUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   analyticsAdminServiceClient.batchDeleteUserLinks(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1097,6 +2028,21 @@ public final void batchDeleteUserLinks(BatchDeleteUserLinksRequest request) { * Deletes information about multiple users' links to an account or property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   BatchDeleteUserLinksRequest request =
+   *       BatchDeleteUserLinksRequest.newBuilder()
+   *           .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString())
+   *           .addAllRequests(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.batchDeleteUserLinksCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable batchDeleteUserLinksCallable() { return stub.batchDeleteUserLinksCallable(); @@ -1106,6 +2052,16 @@ public final UnaryCallable batchDeleteUserLi /** * Lookup for a single WebDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
+   *   WebDataStream response = analyticsAdminServiceClient.getWebDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the web data stream to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1121,6 +2077,16 @@ public final WebDataStream getWebDataStream(WebDataStreamName name) { /** * Lookup for a single WebDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString();
+   *   WebDataStream response = analyticsAdminServiceClient.getWebDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the web data stream to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1135,6 +2101,19 @@ public final WebDataStream getWebDataStream(String name) { /** * Lookup for a single WebDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetWebDataStreamRequest request =
+   *       GetWebDataStreamRequest.newBuilder()
+   *           .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   WebDataStream response = analyticsAdminServiceClient.getWebDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1147,6 +2126,20 @@ public final WebDataStream getWebDataStream(GetWebDataStreamRequest request) { * Lookup for a single WebDataStream * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetWebDataStreamRequest request =
+   *       GetWebDataStreamRequest.newBuilder()
+   *           .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getWebDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   WebDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getWebDataStreamCallable() { return stub.getWebDataStreamCallable(); @@ -1156,6 +2149,16 @@ public final UnaryCallable getWebDataStr /** * Deletes a web stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
+   *   analyticsAdminServiceClient.deleteWebDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the web data stream to delete. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1173,6 +2176,16 @@ public final void deleteWebDataStream(WebDataStreamName name) { /** * Deletes a web stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString();
+   *   analyticsAdminServiceClient.deleteWebDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the web data stream to delete. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -1188,6 +2201,19 @@ public final void deleteWebDataStream(String name) { /** * Deletes a web stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteWebDataStreamRequest request =
+   *       DeleteWebDataStreamRequest.newBuilder()
+   *           .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteWebDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1200,6 +2226,20 @@ public final void deleteWebDataStream(DeleteWebDataStreamRequest request) { * Deletes a web stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteWebDataStreamRequest request =
+   *       DeleteWebDataStreamRequest.newBuilder()
+   *           .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteWebDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteWebDataStreamCallable() { return stub.deleteWebDataStreamCallable(); @@ -1209,6 +2249,18 @@ public final UnaryCallable deleteWebDataStrea /** * Updates a web stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   WebDataStream response =
+   *       analyticsAdminServiceClient.updateWebDataStream(webDataStream, updateMask);
+   * }
+   * }
+ * * @param webDataStream Required. The web stream to update. The `name` field is used to identify * the web stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1230,6 +2282,20 @@ public final WebDataStream updateWebDataStream( /** * Updates a web stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateWebDataStreamRequest request =
+   *       UpdateWebDataStreamRequest.newBuilder()
+   *           .setWebDataStream(WebDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   WebDataStream response = analyticsAdminServiceClient.updateWebDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1242,6 +2308,21 @@ public final WebDataStream updateWebDataStream(UpdateWebDataStreamRequest reques * Updates a web stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateWebDataStreamRequest request =
+   *       UpdateWebDataStreamRequest.newBuilder()
+   *           .setWebDataStream(WebDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateWebDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   WebDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateWebDataStreamCallable() { @@ -1252,6 +2333,18 @@ public final WebDataStream updateWebDataStream(UpdateWebDataStreamRequest reques /** * Creates a web stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
+   *   WebDataStream response =
+   *       analyticsAdminServiceClient.createWebDataStream(parent, webDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this web data stream will be created. Format: * properties/123 * @param webDataStream Required. The web stream to create. @@ -1270,6 +2363,18 @@ public final WebDataStream createWebDataStream(PropertyName parent, WebDataStrea /** * Creates a web stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString();
+   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
+   *   WebDataStream response =
+   *       analyticsAdminServiceClient.createWebDataStream(parent, webDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this web data stream will be created. Format: * properties/123 * @param webDataStream Required. The web stream to create. @@ -1288,6 +2393,20 @@ public final WebDataStream createWebDataStream(String parent, WebDataStream webD /** * Creates a web stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateWebDataStreamRequest request =
+   *       CreateWebDataStreamRequest.newBuilder()
+   *           .setWebDataStream(WebDataStream.newBuilder().build())
+   *           .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   WebDataStream response = analyticsAdminServiceClient.createWebDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1300,6 +2419,21 @@ public final WebDataStream createWebDataStream(CreateWebDataStreamRequest reques * Creates a web stream with the specified location and attributes. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateWebDataStreamRequest request =
+   *       CreateWebDataStreamRequest.newBuilder()
+   *           .setWebDataStream(WebDataStream.newBuilder().build())
+   *           .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createWebDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   WebDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createWebDataStreamCallable() { @@ -1313,6 +2447,19 @@ public final WebDataStream createWebDataStream(CreateWebDataStreamRequest reques *

Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (WebDataStream element :
+   *       analyticsAdminServiceClient.listWebDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to list results of web * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1332,6 +2479,19 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(PropertyName par *

Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString();
+   *   for (WebDataStream element :
+   *       analyticsAdminServiceClient.listWebDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to list results of web * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1349,6 +2509,24 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(String parent) { *

Web data streams will be excluded if the caller does not have access. Returns an empty list * if no relevant web data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListWebDataStreamsRequest request =
+   *       ListWebDataStreamsRequest.newBuilder()
+   *           .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (WebDataStream element :
+   *       analyticsAdminServiceClient.listWebDataStreams(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 */ @@ -1365,6 +2543,24 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( * if no relevant web data streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListWebDataStreamsRequest request =
+   *       ListWebDataStreamsRequest.newBuilder()
+   *           .setParent(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listWebDataStreamsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (WebDataStream element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebDataStreamsPagedCallable() { @@ -1379,6 +2575,25 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( * if no relevant web data streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListWebDataStreamsResponse response =
+   *         analyticsAdminServiceClient.listWebDataStreamsCallable().call(request);
+   *     for (WebDataStream element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listWebDataStreamsCallable() { @@ -1389,6 +2604,16 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( /** * Lookup for a single IosAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
+   *   IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the iOS app data stream to lookup. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1406,6 +2631,16 @@ public final IosAppDataStream getIosAppDataStream(IosAppDataStreamName name) { /** * Lookup for a single IosAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString();
+   *   IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the iOS app data stream to lookup. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1421,6 +2656,19 @@ public final IosAppDataStream getIosAppDataStream(String name) { /** * Lookup for a single IosAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetIosAppDataStreamRequest request =
+   *       GetIosAppDataStreamRequest.newBuilder()
+   *           .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1433,6 +2681,20 @@ public final IosAppDataStream getIosAppDataStream(GetIosAppDataStreamRequest req * Lookup for a single IosAppDataStream * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetIosAppDataStreamRequest request =
+   *       GetIosAppDataStreamRequest.newBuilder()
+   *           .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getIosAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   IosAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getIosAppDataStreamCallable() { @@ -1443,6 +2705,16 @@ public final IosAppDataStream getIosAppDataStream(GetIosAppDataStreamRequest req /** * Deletes an iOS app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
+   *   analyticsAdminServiceClient.deleteIosAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the iOS app data stream to delete. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1460,6 +2732,16 @@ public final void deleteIosAppDataStream(IosAppDataStreamName name) { /** * Deletes an iOS app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString();
+   *   analyticsAdminServiceClient.deleteIosAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the iOS app data stream to delete. Format: * properties/{property_id}/iosAppDataStreams/{stream_id} Example: * "properties/123/iosAppDataStreams/456" @@ -1475,6 +2757,19 @@ public final void deleteIosAppDataStream(String name) { /** * Deletes an iOS app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteIosAppDataStreamRequest request =
+   *       DeleteIosAppDataStreamRequest.newBuilder()
+   *           .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteIosAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1487,6 +2782,20 @@ public final void deleteIosAppDataStream(DeleteIosAppDataStreamRequest request) * Deletes an iOS app stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteIosAppDataStreamRequest request =
+   *       DeleteIosAppDataStreamRequest.newBuilder()
+   *           .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteIosAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteIosAppDataStreamCallable() { @@ -1497,6 +2806,18 @@ public final void deleteIosAppDataStream(DeleteIosAppDataStreamRequest request) /** * Updates an iOS app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IosAppDataStream response =
+   *       analyticsAdminServiceClient.updateIosAppDataStream(iosAppDataStream, updateMask);
+   * }
+   * }
+ * * @param iosAppDataStream Required. The iOS app stream to update. The `name` field is used to * identify the iOS app stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1518,6 +2839,20 @@ public final IosAppDataStream updateIosAppDataStream( /** * Updates an iOS app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateIosAppDataStreamRequest request =
+   *       UpdateIosAppDataStreamRequest.newBuilder()
+   *           .setIosAppDataStream(IosAppDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   IosAppDataStream response = analyticsAdminServiceClient.updateIosAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1530,6 +2865,21 @@ public final IosAppDataStream updateIosAppDataStream(UpdateIosAppDataStreamReque * Updates an iOS app stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateIosAppDataStreamRequest request =
+   *       UpdateIosAppDataStreamRequest.newBuilder()
+   *           .setIosAppDataStream(IosAppDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateIosAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   IosAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateIosAppDataStreamCallable() { @@ -1540,6 +2890,18 @@ public final IosAppDataStream updateIosAppDataStream(UpdateIosAppDataStreamReque /** * Creates an iOS app data stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
+   *   IosAppDataStream response =
+   *       analyticsAdminServiceClient.createIosAppDataStream(parent, iosAppDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this ios app data stream will be created. * Format: properties/123 * @param iosAppDataStream Required. The iOS app data stream to create. @@ -1559,6 +2921,18 @@ public final IosAppDataStream createIosAppDataStream( /** * Creates an iOS app data stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString();
+   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
+   *   IosAppDataStream response =
+   *       analyticsAdminServiceClient.createIosAppDataStream(parent, iosAppDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this ios app data stream will be created. * Format: properties/123 * @param iosAppDataStream Required. The iOS app data stream to create. @@ -1578,6 +2952,20 @@ public final IosAppDataStream createIosAppDataStream( /** * Creates an iOS app data stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateIosAppDataStreamRequest request =
+   *       CreateIosAppDataStreamRequest.newBuilder()
+   *           .setIosAppDataStream(IosAppDataStream.newBuilder().build())
+   *           .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   IosAppDataStream response = analyticsAdminServiceClient.createIosAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1590,6 +2978,21 @@ public final IosAppDataStream createIosAppDataStream(CreateIosAppDataStreamReque * Creates an iOS app data stream with the specified location and attributes. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateIosAppDataStreamRequest request =
+   *       CreateIosAppDataStreamRequest.newBuilder()
+   *           .setIosAppDataStream(IosAppDataStream.newBuilder().build())
+   *           .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createIosAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   IosAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createIosAppDataStreamCallable() { @@ -1603,6 +3006,19 @@ public final IosAppDataStream createIosAppDataStream(CreateIosAppDataStreamReque *

iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (IosAppDataStream element :
+   *       analyticsAdminServiceClient.listIosAppDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to list results of app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1622,6 +3038,19 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(PropertyNa *

iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString();
+   *   for (IosAppDataStream element :
+   *       analyticsAdminServiceClient.listIosAppDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to list results of app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1639,6 +3068,24 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(String par *

iOS app data streams will be excluded if the caller does not have access. Returns an empty * list if no relevant iOS app data streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListIosAppDataStreamsRequest request =
+   *       ListIosAppDataStreamsRequest.newBuilder()
+   *           .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (IosAppDataStream element :
+   *       analyticsAdminServiceClient.listIosAppDataStreams(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 */ @@ -1655,6 +3102,24 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( * list if no relevant iOS app data streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListIosAppDataStreamsRequest request =
+   *       ListIosAppDataStreamsRequest.newBuilder()
+   *           .setParent(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listIosAppDataStreamsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (IosAppDataStream element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIosAppDataStreamsPagedCallable() { @@ -1669,6 +3134,25 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( * list if no relevant iOS app data streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListIosAppDataStreamsResponse response =
+   *         analyticsAdminServiceClient.listIosAppDataStreamsCallable().call(request);
+   *     for (IosAppDataStream element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listIosAppDataStreamsCallable() { @@ -1679,6 +3163,17 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( /** * Lookup for a single AndroidAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AndroidAppDataStreamName name =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
+   *   AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the android app data stream to lookup. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1696,6 +3191,17 @@ public final AndroidAppDataStream getAndroidAppDataStream(AndroidAppDataStreamNa /** * Lookup for a single AndroidAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString();
+   *   AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the android app data stream to lookup. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1711,6 +3217,20 @@ public final AndroidAppDataStream getAndroidAppDataStream(String name) { /** * Lookup for a single AndroidAppDataStream * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAndroidAppDataStreamRequest request =
+   *       GetAndroidAppDataStreamRequest.newBuilder()
+   *           .setName(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1724,6 +3244,21 @@ public final AndroidAppDataStream getAndroidAppDataStream( * Lookup for a single AndroidAppDataStream * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetAndroidAppDataStreamRequest request =
+   *       GetAndroidAppDataStreamRequest.newBuilder()
+   *           .setName(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getAndroidAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   AndroidAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getAndroidAppDataStreamCallable() { @@ -1734,6 +3269,17 @@ public final AndroidAppDataStream getAndroidAppDataStream( /** * Deletes an android app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AndroidAppDataStreamName name =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
+   *   analyticsAdminServiceClient.deleteAndroidAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the android app data stream to delete. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1751,6 +3297,17 @@ public final void deleteAndroidAppDataStream(AndroidAppDataStreamName name) { /** * Deletes an android app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString();
+   *   analyticsAdminServiceClient.deleteAndroidAppDataStream(name);
+   * }
+   * }
+ * * @param name Required. The name of the android app data stream to delete. Format: * properties/{property_id}/androidAppDataStreams/{stream_id} Example: * "properties/123/androidAppDataStreams/456" @@ -1766,6 +3323,20 @@ public final void deleteAndroidAppDataStream(String name) { /** * Deletes an android app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAndroidAppDataStreamRequest request =
+   *       DeleteAndroidAppDataStreamRequest.newBuilder()
+   *           .setName(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteAndroidAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1778,6 +3349,21 @@ public final void deleteAndroidAppDataStream(DeleteAndroidAppDataStreamRequest r * Deletes an android app stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteAndroidAppDataStreamRequest request =
+   *       DeleteAndroidAppDataStreamRequest.newBuilder()
+   *           .setName(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteAndroidAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteAndroidAppDataStreamCallable() { @@ -1788,6 +3374,18 @@ public final void deleteAndroidAppDataStream(DeleteAndroidAppDataStreamRequest r /** * Updates an android app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AndroidAppDataStream response =
+   *       analyticsAdminServiceClient.updateAndroidAppDataStream(androidAppDataStream, updateMask);
+   * }
+   * }
+ * * @param androidAppDataStream Required. The android app stream to update. The `name` field is * used to identify the android app stream to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -1809,6 +3407,21 @@ public final AndroidAppDataStream updateAndroidAppDataStream( /** * Updates an android app stream on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAndroidAppDataStreamRequest request =
+   *       UpdateAndroidAppDataStreamRequest.newBuilder()
+   *           .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   AndroidAppDataStream response =
+   *       analyticsAdminServiceClient.updateAndroidAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1822,6 +3435,21 @@ public final AndroidAppDataStream updateAndroidAppDataStream( * Updates an android app stream on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateAndroidAppDataStreamRequest request =
+   *       UpdateAndroidAppDataStreamRequest.newBuilder()
+   *           .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateAndroidAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   AndroidAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateAndroidAppDataStreamCallable() { @@ -1832,6 +3460,18 @@ public final AndroidAppDataStream updateAndroidAppDataStream( /** * Creates an android app stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
+   *   AndroidAppDataStream response =
+   *       analyticsAdminServiceClient.createAndroidAppDataStream(parent, androidAppDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this android app data stream will be created. * Format: properties/123 * @param androidAppDataStream Required. The android app stream to create. @@ -1851,6 +3491,19 @@ public final AndroidAppDataStream createAndroidAppDataStream( /** * Creates an android app stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString();
+   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
+   *   AndroidAppDataStream response =
+   *       analyticsAdminServiceClient.createAndroidAppDataStream(parent, androidAppDataStream);
+   * }
+   * }
+ * * @param parent Required. The parent resource where this android app data stream will be created. * Format: properties/123 * @param androidAppDataStream Required. The android app stream to create. @@ -1870,6 +3523,22 @@ public final AndroidAppDataStream createAndroidAppDataStream( /** * Creates an android app stream with the specified location and attributes. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateAndroidAppDataStreamRequest request =
+   *       CreateAndroidAppDataStreamRequest.newBuilder()
+   *           .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build())
+   *           .setParent(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   AndroidAppDataStream response =
+   *       analyticsAdminServiceClient.createAndroidAppDataStream(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1883,6 +3552,22 @@ public final AndroidAppDataStream createAndroidAppDataStream( * Creates an android app stream with the specified location and attributes. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateAndroidAppDataStreamRequest request =
+   *       CreateAndroidAppDataStreamRequest.newBuilder()
+   *           .setAndroidAppDataStream(AndroidAppDataStream.newBuilder().build())
+   *           .setParent(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createAndroidAppDataStreamCallable().futureCall(request);
+   *   // Do something.
+   *   AndroidAppDataStream response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createAndroidAppDataStreamCallable() { @@ -1896,6 +3581,19 @@ public final AndroidAppDataStream createAndroidAppDataStream( *

Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (AndroidAppDataStream element :
+   *       analyticsAdminServiceClient.listAndroidAppDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to limit results to app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1916,6 +3614,20 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( *

Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent =
+   *       AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString();
+   *   for (AndroidAppDataStream element :
+   *       analyticsAdminServiceClient.listAndroidAppDataStreams(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. The name of the parent property. For example, to limit results to app * streams under the property with Id 123: "properties/123" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1933,6 +3645,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams(St *

Android app streams will be excluded if the caller does not have access. Returns an empty * list if no relevant android app streams are found. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAndroidAppDataStreamsRequest request =
+   *       ListAndroidAppDataStreamsRequest.newBuilder()
+   *           .setParent(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (AndroidAppDataStream element :
+   *       analyticsAdminServiceClient.listAndroidAppDataStreams(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 */ @@ -1949,6 +3680,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListAndroidAppDataStreamsRequest request =
+   *       ListAndroidAppDataStreamsRequest.newBuilder()
+   *           .setParent(
+   *               AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listAndroidAppDataStreamsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AndroidAppDataStream element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable< ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsPagedResponse> @@ -1964,6 +3714,25 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListAndroidAppDataStreamsResponse response =
+   *         analyticsAdminServiceClient.listAndroidAppDataStreamsCallable().call(request);
+   *     for (AndroidAppDataStream element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listAndroidAppDataStreamsCallable() { @@ -1975,6 +3744,18 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * Returns the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   EnhancedMeasurementSettingsName name =
+   *       EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
+   *   EnhancedMeasurementSettings response =
+   *       analyticsAdminServiceClient.getEnhancedMeasurementSettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the settings to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: * "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" @@ -1994,6 +3775,18 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * Returns the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name =
+   *       EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString();
+   *   EnhancedMeasurementSettings response =
+   *       analyticsAdminServiceClient.getEnhancedMeasurementSettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the settings to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: * "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" @@ -2010,6 +3803,21 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String n * Returns the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetEnhancedMeasurementSettingsRequest request =
+   *       GetEnhancedMeasurementSettingsRequest.newBuilder()
+   *           .setName(
+   *               EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   EnhancedMeasurementSettings response =
+   *       analyticsAdminServiceClient.getEnhancedMeasurementSettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2024,6 +3832,21 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * must enable enhanced measurement for these settings to take effect. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetEnhancedMeasurementSettingsRequest request =
+   *       GetEnhancedMeasurementSettingsRequest.newBuilder()
+   *           .setName(
+   *               EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   EnhancedMeasurementSettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getEnhancedMeasurementSettingsCallable() { @@ -2035,6 +3858,20 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( * Updates the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   EnhancedMeasurementSettings enhancedMeasurementSettings =
+   *       EnhancedMeasurementSettings.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   EnhancedMeasurementSettings response =
+   *       analyticsAdminServiceClient.updateEnhancedMeasurementSettings(
+   *           enhancedMeasurementSettings, updateMask);
+   * }
+   * }
+ * * @param enhancedMeasurementSettings Required. The settings to update. The `name` field is used * to identify the settings to be updated. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be @@ -2057,6 +3894,21 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * Updates the singleton enhanced measurement settings for this web stream. Note that the stream * must enable enhanced measurement for these settings to take effect. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateEnhancedMeasurementSettingsRequest request =
+   *       UpdateEnhancedMeasurementSettingsRequest.newBuilder()
+   *           .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   EnhancedMeasurementSettings response =
+   *       analyticsAdminServiceClient.updateEnhancedMeasurementSettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2071,6 +3923,23 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * must enable enhanced measurement for these settings to take effect. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateEnhancedMeasurementSettingsRequest request =
+   *       UpdateEnhancedMeasurementSettingsRequest.newBuilder()
+   *           .setEnhancedMeasurementSettings(EnhancedMeasurementSettings.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient
+   *           .updateEnhancedMeasurementSettingsCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   EnhancedMeasurementSettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateEnhancedMeasurementSettingsCallable() { @@ -2083,6 +3952,17 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( * *

Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
+   * }
+   * }
+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2102,6 +3982,17 @@ public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink f * *

Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
+   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent, firebaseLink);
+   * }
+   * }
+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @param firebaseLink Required. The Firebase link to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2121,6 +4012,20 @@ public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebas * *

Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateFirebaseLinkRequest request =
+   *       CreateFirebaseLinkRequest.newBuilder()
+   *           .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .build();
+   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2135,6 +4040,21 @@ public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) *

Properties can have at most one FirebaseLink. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateFirebaseLinkRequest request =
+   *       CreateFirebaseLinkRequest.newBuilder()
+   *           .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   FirebaseLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createFirebaseLinkCallable() { return stub.createFirebaseLinkCallable(); @@ -2144,6 +4064,18 @@ public final UnaryCallable createFireba /** * Updates a FirebaseLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   FirebaseLink response =
+   *       analyticsAdminServiceClient.updateFirebaseLink(firebaseLink, updateMask);
+   * }
+   * }
+ * * @param firebaseLink Required. The Firebase link to update. * @param updateMask Required. The list of fields to be updated. Omitted fields will not be * updated. To replace the entire entity, use one path with the string "*" to match all @@ -2163,6 +4095,20 @@ public final FirebaseLink updateFirebaseLink(FirebaseLink firebaseLink, FieldMas /** * Updates a FirebaseLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateFirebaseLinkRequest request =
+   *       UpdateFirebaseLinkRequest.newBuilder()
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   FirebaseLink response = analyticsAdminServiceClient.updateFirebaseLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2175,6 +4121,21 @@ public final FirebaseLink updateFirebaseLink(UpdateFirebaseLinkRequest request) * Updates a FirebaseLink on a property * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateFirebaseLinkRequest request =
+   *       UpdateFirebaseLinkRequest.newBuilder()
+   *           .setFirebaseLink(FirebaseLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   FirebaseLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateFirebaseLinkCallable() { return stub.updateFirebaseLinkCallable(); @@ -2184,6 +4145,16 @@ public final UnaryCallable updateFireba /** * Deletes a FirebaseLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
+   *   analyticsAdminServiceClient.deleteFirebaseLink(name);
+   * }
+   * }
+ * * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} * Example: properties/1234/firebaseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2200,6 +4171,16 @@ public final void deleteFirebaseLink(FirebaseLinkName name) { /** * Deletes a FirebaseLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
+   *   analyticsAdminServiceClient.deleteFirebaseLink(name);
+   * }
+   * }
+ * * @param name Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} * Example: properties/1234/firebaseLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2214,6 +4195,19 @@ public final void deleteFirebaseLink(String name) { /** * Deletes a FirebaseLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteFirebaseLinkRequest request =
+   *       DeleteFirebaseLinkRequest.newBuilder()
+   *           .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteFirebaseLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2226,6 +4220,20 @@ public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { * Deletes a FirebaseLink on a property * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteFirebaseLinkRequest request =
+   *       DeleteFirebaseLinkRequest.newBuilder()
+   *           .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteFirebaseLinkCallable() { return stub.deleteFirebaseLinkCallable(); @@ -2235,6 +4243,19 @@ public final UnaryCallable deleteFirebaseLinkC /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2250,6 +4271,19 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(PropertyName paren /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString();
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2263,6 +4297,24 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(String parent) { /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListFirebaseLinksRequest request =
+   *       ListFirebaseLinksRequest.newBuilder()
+   *           .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (FirebaseLink element :
+   *       analyticsAdminServiceClient.listFirebaseLinks(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 */ @@ -2275,6 +4327,24 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListFirebaseLinksRequest request =
+   *       ListFirebaseLinksRequest.newBuilder()
+   *           .setParent(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listFirebaseLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (FirebaseLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFirebaseLinksPagedCallable() { @@ -2286,6 +4356,25 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListFirebaseLinksResponse response =
+   *         analyticsAdminServiceClient.listFirebaseLinksCallable().call(request);
+   *     for (FirebaseLink element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listFirebaseLinksCallable() { @@ -2296,6 +4385,16 @@ public final ListFirebaseLinksPagedResponse listFirebaseLinks(ListFirebaseLinksR /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]");
+   *   GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name);
+   * }
+   * }
+ * * @param name Required. The name of the site tag to lookup. Note that site tags are singletons * and do not have unique IDs. Format: * properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag Example: @@ -2312,6 +4411,16 @@ public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = GlobalSiteTagName.of("[PROPERTY]").toString();
+   *   GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name);
+   * }
+   * }
+ * * @param name Required. The name of the site tag to lookup. Note that site tags are singletons * and do not have unique IDs. Format: * properties/{property_id}/webDataStreams/{stream_id}/globalSiteTag Example: @@ -2327,6 +4436,19 @@ public final GlobalSiteTag getGlobalSiteTag(String name) { /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetGlobalSiteTagRequest request =
+   *       GetGlobalSiteTagRequest.newBuilder()
+   *           .setName(GlobalSiteTagName.of("[PROPERTY]").toString())
+   *           .build();
+   *   GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2339,6 +4461,20 @@ public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetGlobalSiteTagRequest request =
+   *       GetGlobalSiteTagRequest.newBuilder()
+   *           .setName(GlobalSiteTagName.of("[PROPERTY]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request);
+   *   // Do something.
+   *   GlobalSiteTag response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getGlobalSiteTagCallable() { return stub.getGlobalSiteTagCallable(); @@ -2348,6 +4484,18 @@ public final UnaryCallable getGlobalSite /** * Creates a GoogleAdsLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
+   * }
+   * }
+ * * @param parent Required. Example format: properties/1234 * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2365,6 +4513,18 @@ public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLin /** * Creates a GoogleAdsLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.createGoogleAdsLink(parent, googleAdsLink);
+   * }
+   * }
+ * * @param parent Required. Example format: properties/1234 * @param googleAdsLink Required. The GoogleAdsLink to create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2382,6 +4542,20 @@ public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink goog /** * Creates a GoogleAdsLink. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateGoogleAdsLinkRequest request =
+   *       CreateGoogleAdsLinkRequest.newBuilder()
+   *           .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .build();
+   *   GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2394,6 +4568,21 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques * Creates a GoogleAdsLink. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   CreateGoogleAdsLinkRequest request =
+   *       CreateGoogleAdsLinkRequest.newBuilder()
+   *           .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   GoogleAdsLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable createGoogleAdsLinkCallable() { @@ -2404,6 +4593,18 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques /** * Updates a GoogleAdsLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   GoogleAdsLink response =
+   *       analyticsAdminServiceClient.updateGoogleAdsLink(googleAdsLink, updateMask);
+   * }
+   * }
+ * * @param googleAdsLink The GoogleAdsLink to update * @param updateMask Required. The list of fields to be updated. Omitted fields will not be * updated. To replace the entire entity, use one path with the string "*" to match all @@ -2424,6 +4625,20 @@ public final GoogleAdsLink updateGoogleAdsLink( /** * Updates a GoogleAdsLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateGoogleAdsLinkRequest request =
+   *       UpdateGoogleAdsLinkRequest.newBuilder()
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   GoogleAdsLink response = analyticsAdminServiceClient.updateGoogleAdsLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2436,6 +4651,21 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques * Updates a GoogleAdsLink on a property * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   UpdateGoogleAdsLinkRequest request =
+   *       UpdateGoogleAdsLinkRequest.newBuilder()
+   *           .setGoogleAdsLink(GoogleAdsLink.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   GoogleAdsLink response = future.get();
+   * }
+   * }
*/ public final UnaryCallable updateGoogleAdsLinkCallable() { @@ -2446,6 +4676,16 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques /** * Deletes a GoogleAdsLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2461,6 +4701,16 @@ public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { /** * Deletes a GoogleAdsLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(name);
+   * }
+   * }
+ * * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2474,6 +4724,19 @@ public final void deleteGoogleAdsLink(String name) { /** * Deletes a GoogleAdsLink on a property * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteGoogleAdsLinkRequest request =
+   *       DeleteGoogleAdsLinkRequest.newBuilder()
+   *           .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .build();
+   *   analyticsAdminServiceClient.deleteGoogleAdsLink(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2486,6 +4749,20 @@ public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { * Deletes a GoogleAdsLink on a property * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DeleteGoogleAdsLinkRequest request =
+   *       DeleteGoogleAdsLinkRequest.newBuilder()
+   *           .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
*/ public final UnaryCallable deleteGoogleAdsLinkCallable() { return stub.deleteGoogleAdsLinkCallable(); @@ -2495,6 +4772,19 @@ public final UnaryCallable deleteGoogleAdsLin /** * Lists GoogleAdsLinks on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   PropertyName parent = PropertyName.of("[PROPERTY]");
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2510,6 +4800,19 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName par /** * Lists GoogleAdsLinks on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String parent = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString();
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2523,6 +4826,24 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { /** * Lists GoogleAdsLinks on a property. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListGoogleAdsLinksRequest request =
+   *       ListGoogleAdsLinksRequest.newBuilder()
+   *           .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (GoogleAdsLink element :
+   *       analyticsAdminServiceClient.listGoogleAdsLinks(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 */ @@ -2536,6 +4857,24 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * Lists GoogleAdsLinks on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   ListGoogleAdsLinksRequest request =
+   *       ListGoogleAdsLinksRequest.newBuilder()
+   *           .setParent(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (GoogleAdsLink element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listGoogleAdsLinksPagedCallable() { @@ -2547,6 +4886,25 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( * Lists GoogleAdsLinks on a property. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   while (true) {
+   *     ListGoogleAdsLinksResponse response =
+   *         analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request);
+   *     for (GoogleAdsLink element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable listGoogleAdsLinksCallable() { @@ -2557,6 +4915,16 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( /** * Get data sharing settings on an account. Data sharing settings are singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the settings to lookup. Format: * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2573,6 +4941,16 @@ public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName /** * Get data sharing settings on an account. Data sharing settings are singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   String name = DataSharingSettingsName.of("[ACCOUNT]").toString();
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name);
+   * }
+   * }
+ * * @param name Required. The name of the settings to lookup. Format: * accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings" * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2587,6 +4965,19 @@ public final DataSharingSettings getDataSharingSettings(String name) { /** * Get data sharing settings on an account. Data sharing settings are singletons. * + *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataSharingSettingsRequest request =
+   *       GetDataSharingSettingsRequest.newBuilder()
+   *           .setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
+   *           .build();
+   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2599,6 +4990,20 @@ public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRe * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: + * + *

{@code
+   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+   *     AnalyticsAdminServiceClient.create()) {
+   *   GetDataSharingSettingsRequest request =
+   *       GetDataSharingSettingsRequest.newBuilder()
+   *           .setName(DataSharingSettingsName.of("[ACCOUNT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       analyticsAdminServiceClient.getDataSharingSettingsCallable().futureCall(request);
+   *   // Do something.
+   *   DataSharingSettings response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getDataSharingSettingsCallable() { diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json new file mode 100644 index 00000000..3f067ac4 --- /dev/null +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json @@ -0,0 +1,162 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.analytics.admin.v1alpha", + "libraryPackage": "com.google.analytics.admin.v1alpha", + "services": { + "AnalyticsAdminService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "AuditUserLinks": { + "methods": ["auditUserLinks", "auditUserLinksPagedCallable", "auditUserLinksCallable"] + }, + "BatchCreateUserLinks": { + "methods": ["batchCreateUserLinks", "batchCreateUserLinksCallable"] + }, + "BatchDeleteUserLinks": { + "methods": ["batchDeleteUserLinks", "batchDeleteUserLinksCallable"] + }, + "BatchGetUserLinks": { + "methods": ["batchGetUserLinks", "batchGetUserLinksCallable"] + }, + "BatchUpdateUserLinks": { + "methods": ["batchUpdateUserLinks", "batchUpdateUserLinksCallable"] + }, + "CreateAndroidAppDataStream": { + "methods": ["createAndroidAppDataStream", "createAndroidAppDataStream", "createAndroidAppDataStream", "createAndroidAppDataStreamCallable"] + }, + "CreateFirebaseLink": { + "methods": ["createFirebaseLink", "createFirebaseLink", "createFirebaseLink", "createFirebaseLinkCallable"] + }, + "CreateGoogleAdsLink": { + "methods": ["createGoogleAdsLink", "createGoogleAdsLink", "createGoogleAdsLink", "createGoogleAdsLinkCallable"] + }, + "CreateIosAppDataStream": { + "methods": ["createIosAppDataStream", "createIosAppDataStream", "createIosAppDataStream", "createIosAppDataStreamCallable"] + }, + "CreateProperty": { + "methods": ["createProperty", "createProperty", "createPropertyCallable"] + }, + "CreateUserLink": { + "methods": ["createUserLink", "createUserLink", "createUserLink", "createUserLink", "createUserLinkCallable"] + }, + "CreateWebDataStream": { + "methods": ["createWebDataStream", "createWebDataStream", "createWebDataStream", "createWebDataStreamCallable"] + }, + "DeleteAccount": { + "methods": ["deleteAccount", "deleteAccount", "deleteAccount", "deleteAccountCallable"] + }, + "DeleteAndroidAppDataStream": { + "methods": ["deleteAndroidAppDataStream", "deleteAndroidAppDataStream", "deleteAndroidAppDataStream", "deleteAndroidAppDataStreamCallable"] + }, + "DeleteFirebaseLink": { + "methods": ["deleteFirebaseLink", "deleteFirebaseLink", "deleteFirebaseLink", "deleteFirebaseLinkCallable"] + }, + "DeleteGoogleAdsLink": { + "methods": ["deleteGoogleAdsLink", "deleteGoogleAdsLink", "deleteGoogleAdsLink", "deleteGoogleAdsLinkCallable"] + }, + "DeleteIosAppDataStream": { + "methods": ["deleteIosAppDataStream", "deleteIosAppDataStream", "deleteIosAppDataStream", "deleteIosAppDataStreamCallable"] + }, + "DeleteProperty": { + "methods": ["deleteProperty", "deleteProperty", "deleteProperty", "deletePropertyCallable"] + }, + "DeleteUserLink": { + "methods": ["deleteUserLink", "deleteUserLink", "deleteUserLink", "deleteUserLinkCallable"] + }, + "DeleteWebDataStream": { + "methods": ["deleteWebDataStream", "deleteWebDataStream", "deleteWebDataStream", "deleteWebDataStreamCallable"] + }, + "GetAccount": { + "methods": ["getAccount", "getAccount", "getAccount", "getAccountCallable"] + }, + "GetAndroidAppDataStream": { + "methods": ["getAndroidAppDataStream", "getAndroidAppDataStream", "getAndroidAppDataStream", "getAndroidAppDataStreamCallable"] + }, + "GetDataSharingSettings": { + "methods": ["getDataSharingSettings", "getDataSharingSettings", "getDataSharingSettings", "getDataSharingSettingsCallable"] + }, + "GetEnhancedMeasurementSettings": { + "methods": ["getEnhancedMeasurementSettings", "getEnhancedMeasurementSettings", "getEnhancedMeasurementSettings", "getEnhancedMeasurementSettingsCallable"] + }, + "GetGlobalSiteTag": { + "methods": ["getGlobalSiteTag", "getGlobalSiteTag", "getGlobalSiteTag", "getGlobalSiteTagCallable"] + }, + "GetIosAppDataStream": { + "methods": ["getIosAppDataStream", "getIosAppDataStream", "getIosAppDataStream", "getIosAppDataStreamCallable"] + }, + "GetProperty": { + "methods": ["getProperty", "getProperty", "getProperty", "getPropertyCallable"] + }, + "GetUserLink": { + "methods": ["getUserLink", "getUserLink", "getUserLink", "getUserLinkCallable"] + }, + "GetWebDataStream": { + "methods": ["getWebDataStream", "getWebDataStream", "getWebDataStream", "getWebDataStreamCallable"] + }, + "ListAccountSummaries": { + "methods": ["listAccountSummaries", "listAccountSummariesPagedCallable", "listAccountSummariesCallable"] + }, + "ListAccounts": { + "methods": ["listAccounts", "listAccountsPagedCallable", "listAccountsCallable"] + }, + "ListAndroidAppDataStreams": { + "methods": ["listAndroidAppDataStreams", "listAndroidAppDataStreams", "listAndroidAppDataStreams", "listAndroidAppDataStreamsPagedCallable", "listAndroidAppDataStreamsCallable"] + }, + "ListFirebaseLinks": { + "methods": ["listFirebaseLinks", "listFirebaseLinks", "listFirebaseLinks", "listFirebaseLinksPagedCallable", "listFirebaseLinksCallable"] + }, + "ListGoogleAdsLinks": { + "methods": ["listGoogleAdsLinks", "listGoogleAdsLinks", "listGoogleAdsLinks", "listGoogleAdsLinksPagedCallable", "listGoogleAdsLinksCallable"] + }, + "ListIosAppDataStreams": { + "methods": ["listIosAppDataStreams", "listIosAppDataStreams", "listIosAppDataStreams", "listIosAppDataStreamsPagedCallable", "listIosAppDataStreamsCallable"] + }, + "ListProperties": { + "methods": ["listProperties", "listPropertiesPagedCallable", "listPropertiesCallable"] + }, + "ListUserLinks": { + "methods": ["listUserLinks", "listUserLinks", "listUserLinks", "listUserLinks", "listUserLinksPagedCallable", "listUserLinksCallable"] + }, + "ListWebDataStreams": { + "methods": ["listWebDataStreams", "listWebDataStreams", "listWebDataStreams", "listWebDataStreamsPagedCallable", "listWebDataStreamsCallable"] + }, + "ProvisionAccountTicket": { + "methods": ["provisionAccountTicket", "provisionAccountTicketCallable"] + }, + "UpdateAccount": { + "methods": ["updateAccount", "updateAccount", "updateAccountCallable"] + }, + "UpdateAndroidAppDataStream": { + "methods": ["updateAndroidAppDataStream", "updateAndroidAppDataStream", "updateAndroidAppDataStreamCallable"] + }, + "UpdateEnhancedMeasurementSettings": { + "methods": ["updateEnhancedMeasurementSettings", "updateEnhancedMeasurementSettings", "updateEnhancedMeasurementSettingsCallable"] + }, + "UpdateFirebaseLink": { + "methods": ["updateFirebaseLink", "updateFirebaseLink", "updateFirebaseLinkCallable"] + }, + "UpdateGoogleAdsLink": { + "methods": ["updateGoogleAdsLink", "updateGoogleAdsLink", "updateGoogleAdsLinkCallable"] + }, + "UpdateIosAppDataStream": { + "methods": ["updateIosAppDataStream", "updateIosAppDataStream", "updateIosAppDataStreamCallable"] + }, + "UpdateProperty": { + "methods": ["updateProperty", "updateProperty", "updatePropertyCallable"] + }, + "UpdateUserLink": { + "methods": ["updateUserLink", "updateUserLink", "updateUserLinkCallable"] + }, + "UpdateWebDataStream": { + "methods": ["updateWebDataStream", "updateWebDataStream", "updateWebDataStreamCallable"] + } + } + } + } + } + } +} \ No newline at end of file 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 1be100a4..ddd2fd62 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 @@ -22,6 +22,14 @@ *

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

Sample for AnalyticsAdminServiceClient: + * + *

{@code
+ * try (AnalyticsAdminServiceClient analyticsAdminServiceClient =
+ *     AnalyticsAdminServiceClient.create()) {
+ *   AccountName name = AccountName.of("[ACCOUNT]");
+ *   Account response = analyticsAdminServiceClient.getAccount(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.analytics.admin.v1alpha; 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 fa1bf02c..581c329c 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 @@ -1693,261 +1693,319 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable getAccountCallable() { return getAccountCallable; } + @Override public UnaryCallable listAccountsCallable() { return listAccountsCallable; } + @Override public UnaryCallable listAccountsPagedCallable() { return listAccountsPagedCallable; } + @Override public UnaryCallable deleteAccountCallable() { return deleteAccountCallable; } + @Override public UnaryCallable updateAccountCallable() { return updateAccountCallable; } + @Override public UnaryCallable provisionAccountTicketCallable() { return provisionAccountTicketCallable; } + @Override public UnaryCallable listAccountSummariesCallable() { return listAccountSummariesCallable; } + @Override public UnaryCallable listAccountSummariesPagedCallable() { return listAccountSummariesPagedCallable; } + @Override public UnaryCallable getPropertyCallable() { return getPropertyCallable; } + @Override public UnaryCallable listPropertiesCallable() { return listPropertiesCallable; } + @Override public UnaryCallable listPropertiesPagedCallable() { return listPropertiesPagedCallable; } + @Override public UnaryCallable createPropertyCallable() { return createPropertyCallable; } + @Override public UnaryCallable deletePropertyCallable() { return deletePropertyCallable; } + @Override public UnaryCallable updatePropertyCallable() { return updatePropertyCallable; } + @Override public UnaryCallable getUserLinkCallable() { return getUserLinkCallable; } + @Override public UnaryCallable batchGetUserLinksCallable() { return batchGetUserLinksCallable; } + @Override public UnaryCallable listUserLinksCallable() { return listUserLinksCallable; } + @Override public UnaryCallable listUserLinksPagedCallable() { return listUserLinksPagedCallable; } + @Override public UnaryCallable auditUserLinksCallable() { return auditUserLinksCallable; } + @Override public UnaryCallable auditUserLinksPagedCallable() { return auditUserLinksPagedCallable; } + @Override public UnaryCallable createUserLinkCallable() { return createUserLinkCallable; } + @Override public UnaryCallable batchCreateUserLinksCallable() { return batchCreateUserLinksCallable; } + @Override public UnaryCallable updateUserLinkCallable() { return updateUserLinkCallable; } + @Override public UnaryCallable batchUpdateUserLinksCallable() { return batchUpdateUserLinksCallable; } + @Override public UnaryCallable deleteUserLinkCallable() { return deleteUserLinkCallable; } + @Override public UnaryCallable batchDeleteUserLinksCallable() { return batchDeleteUserLinksCallable; } + @Override public UnaryCallable getWebDataStreamCallable() { return getWebDataStreamCallable; } + @Override public UnaryCallable deleteWebDataStreamCallable() { return deleteWebDataStreamCallable; } + @Override public UnaryCallable updateWebDataStreamCallable() { return updateWebDataStreamCallable; } + @Override public UnaryCallable createWebDataStreamCallable() { return createWebDataStreamCallable; } + @Override public UnaryCallable listWebDataStreamsCallable() { return listWebDataStreamsCallable; } + @Override public UnaryCallable listWebDataStreamsPagedCallable() { return listWebDataStreamsPagedCallable; } + @Override public UnaryCallable getIosAppDataStreamCallable() { return getIosAppDataStreamCallable; } + @Override public UnaryCallable deleteIosAppDataStreamCallable() { return deleteIosAppDataStreamCallable; } + @Override public UnaryCallable updateIosAppDataStreamCallable() { return updateIosAppDataStreamCallable; } + @Override public UnaryCallable createIosAppDataStreamCallable() { return createIosAppDataStreamCallable; } + @Override public UnaryCallable listIosAppDataStreamsCallable() { return listIosAppDataStreamsCallable; } + @Override public UnaryCallable listIosAppDataStreamsPagedCallable() { return listIosAppDataStreamsPagedCallable; } + @Override public UnaryCallable getAndroidAppDataStreamCallable() { return getAndroidAppDataStreamCallable; } + @Override public UnaryCallable deleteAndroidAppDataStreamCallable() { return deleteAndroidAppDataStreamCallable; } + @Override public UnaryCallable updateAndroidAppDataStreamCallable() { return updateAndroidAppDataStreamCallable; } + @Override public UnaryCallable createAndroidAppDataStreamCallable() { return createAndroidAppDataStreamCallable; } + @Override public UnaryCallable listAndroidAppDataStreamsCallable() { return listAndroidAppDataStreamsCallable; } + @Override public UnaryCallable listAndroidAppDataStreamsPagedCallable() { return listAndroidAppDataStreamsPagedCallable; } + @Override public UnaryCallable getEnhancedMeasurementSettingsCallable() { return getEnhancedMeasurementSettingsCallable; } + @Override public UnaryCallable updateEnhancedMeasurementSettingsCallable() { return updateEnhancedMeasurementSettingsCallable; } + @Override public UnaryCallable createFirebaseLinkCallable() { return createFirebaseLinkCallable; } + @Override public UnaryCallable updateFirebaseLinkCallable() { return updateFirebaseLinkCallable; } + @Override public UnaryCallable deleteFirebaseLinkCallable() { return deleteFirebaseLinkCallable; } + @Override public UnaryCallable listFirebaseLinksCallable() { return listFirebaseLinksCallable; } + @Override public UnaryCallable listFirebaseLinksPagedCallable() { return listFirebaseLinksPagedCallable; } + @Override public UnaryCallable getGlobalSiteTagCallable() { return getGlobalSiteTagCallable; } + @Override public UnaryCallable createGoogleAdsLinkCallable() { return createGoogleAdsLinkCallable; } + @Override public UnaryCallable updateGoogleAdsLinkCallable() { return updateGoogleAdsLinkCallable; } + @Override public UnaryCallable deleteGoogleAdsLinkCallable() { return deleteGoogleAdsLinkCallable; } + @Override public UnaryCallable listGoogleAdsLinksCallable() { return listGoogleAdsLinksCallable; } + @Override public UnaryCallable listGoogleAdsLinksPagedCallable() { return listGoogleAdsLinksPagedCallable; } + @Override public UnaryCallable getDataSharingSettingsCallable() { return getDataSharingSettingsCallable; 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 03705d9c..8ff79722 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 @@ -460,6 +460,7 @@ public void getPropertyTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParent("parent-995424086") .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) .setTimeZone("timeZone-2077180903") .setCurrencyCode("currencyCode1004773790") .setDeleted(true) @@ -505,6 +506,7 @@ public void getPropertyTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParent("parent-995424086") .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) .setTimeZone("timeZone-2077180903") .setCurrencyCode("currencyCode1004773790") .setDeleted(true) @@ -609,6 +611,7 @@ public void createPropertyTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParent("parent-995424086") .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) .setTimeZone("timeZone-2077180903") .setCurrencyCode("currencyCode1004773790") .setDeleted(true) @@ -722,6 +725,7 @@ public void updatePropertyTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParent("parent-995424086") .setDisplayName("displayName1714148973") + .setIndustryCategory(IndustryCategory.forNumber(0)) .setTimeZone("timeZone-2077180903") .setCurrencyCode("currencyCode1004773790") .setDeleted(true) @@ -2798,6 +2802,7 @@ public void createFirebaseLinkTest() throws Exception { .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) .setProject("project-309310695") .setCreateTime(Timestamp.newBuilder().build()) + .setMaximumUserAccess(MaximumUserAccess.forNumber(0)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2841,6 +2846,7 @@ public void createFirebaseLinkTest2() throws Exception { .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) .setProject("project-309310695") .setCreateTime(Timestamp.newBuilder().build()) + .setMaximumUserAccess(MaximumUserAccess.forNumber(0)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2884,6 +2890,7 @@ public void updateFirebaseLinkTest() throws Exception { .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) .setProject("project-309310695") .setCreateTime(Timestamp.newBuilder().build()) + .setMaximumUserAccess(MaximumUserAccess.forNumber(0)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); 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 f8bbdba0..67608409 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 @@ -69,7 +69,13 @@ public void getAccount(GetAccountRequest request, StreamObserver respon } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAccount, expected %s or %s", + response.getClass().getName(), + Account.class.getName(), + Exception.class.getName()))); } } @@ -84,7 +90,13 @@ public void listAccounts( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAccounts, expected %s or %s", + response.getClass().getName(), + ListAccountsResponse.class.getName(), + Exception.class.getName()))); } } @@ -98,7 +110,13 @@ public void deleteAccount(DeleteAccountRequest request, StreamObserver re } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAccount, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -113,7 +131,13 @@ public void updateAccount( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAccount, expected %s or %s", + response.getClass().getName(), + Account.class.getName(), + Exception.class.getName()))); } } @@ -129,7 +153,13 @@ public void provisionAccountTicket( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ProvisionAccountTicket, expected %s or %s", + response.getClass().getName(), + ProvisionAccountTicketResponse.class.getName(), + Exception.class.getName()))); } } @@ -145,7 +175,13 @@ public void listAccountSummaries( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAccountSummaries, expected %s or %s", + response.getClass().getName(), + ListAccountSummariesResponse.class.getName(), + Exception.class.getName()))); } } @@ -159,7 +195,13 @@ public void getProperty(GetPropertyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProperty, expected %s or %s", + response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); } } @@ -174,7 +216,13 @@ public void listProperties( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProperties, expected %s or %s", + response.getClass().getName(), + ListPropertiesResponse.class.getName(), + Exception.class.getName()))); } } @@ -189,7 +237,13 @@ public void createProperty( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateProperty, expected %s or %s", + response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); } } @@ -204,7 +258,13 @@ public void deleteProperty( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProperty, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -219,7 +279,13 @@ public void updateProperty( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateProperty, expected %s or %s", + response.getClass().getName(), + Property.class.getName(), + Exception.class.getName()))); } } @@ -233,7 +299,13 @@ public void getUserLink(GetUserLinkRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetUserLink, expected %s or %s", + response.getClass().getName(), + UserLink.class.getName(), + Exception.class.getName()))); } } @@ -249,7 +321,13 @@ public void batchGetUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchGetUserLinks, expected %s or %s", + response.getClass().getName(), + BatchGetUserLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -264,7 +342,13 @@ public void listUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUserLinks, expected %s or %s", + response.getClass().getName(), + ListUserLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -279,7 +363,13 @@ public void auditUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method AuditUserLinks, expected %s or %s", + response.getClass().getName(), + AuditUserLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -294,7 +384,13 @@ public void createUserLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateUserLink, expected %s or %s", + response.getClass().getName(), + UserLink.class.getName(), + Exception.class.getName()))); } } @@ -310,7 +406,13 @@ public void batchCreateUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchCreateUserLinks, expected %s or %s", + response.getClass().getName(), + BatchCreateUserLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -325,7 +427,13 @@ public void updateUserLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateUserLink, expected %s or %s", + response.getClass().getName(), + UserLink.class.getName(), + Exception.class.getName()))); } } @@ -341,7 +449,13 @@ public void batchUpdateUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchUpdateUserLinks, expected %s or %s", + response.getClass().getName(), + BatchUpdateUserLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -356,7 +470,13 @@ public void deleteUserLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteUserLink, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -371,7 +491,13 @@ public void batchDeleteUserLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchDeleteUserLinks, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -386,7 +512,13 @@ public void getWebDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetWebDataStream, expected %s or %s", + response.getClass().getName(), + WebDataStream.class.getName(), + Exception.class.getName()))); } } @@ -401,7 +533,13 @@ public void deleteWebDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteWebDataStream, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -416,7 +554,13 @@ public void updateWebDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateWebDataStream, expected %s or %s", + response.getClass().getName(), + WebDataStream.class.getName(), + Exception.class.getName()))); } } @@ -431,7 +575,13 @@ public void createWebDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateWebDataStream, expected %s or %s", + response.getClass().getName(), + WebDataStream.class.getName(), + Exception.class.getName()))); } } @@ -447,7 +597,13 @@ public void listWebDataStreams( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListWebDataStreams, expected %s or %s", + response.getClass().getName(), + ListWebDataStreamsResponse.class.getName(), + Exception.class.getName()))); } } @@ -462,7 +618,13 @@ public void getIosAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIosAppDataStream, expected %s or %s", + response.getClass().getName(), + IosAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -477,7 +639,13 @@ public void deleteIosAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteIosAppDataStream, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -492,7 +660,13 @@ public void updateIosAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateIosAppDataStream, expected %s or %s", + response.getClass().getName(), + IosAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -507,7 +681,13 @@ public void createIosAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateIosAppDataStream, expected %s or %s", + response.getClass().getName(), + IosAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -523,7 +703,13 @@ public void listIosAppDataStreams( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIosAppDataStreams, expected %s or %s", + response.getClass().getName(), + ListIosAppDataStreamsResponse.class.getName(), + Exception.class.getName()))); } } @@ -539,7 +725,13 @@ public void getAndroidAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAndroidAppDataStream, expected %s or %s", + response.getClass().getName(), + AndroidAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -554,7 +746,13 @@ public void deleteAndroidAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAndroidAppDataStream, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -570,7 +768,13 @@ public void updateAndroidAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAndroidAppDataStream, expected %s or %s", + response.getClass().getName(), + AndroidAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -586,7 +790,13 @@ public void createAndroidAppDataStream( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAndroidAppDataStream, expected %s or %s", + response.getClass().getName(), + AndroidAppDataStream.class.getName(), + Exception.class.getName()))); } } @@ -602,7 +812,13 @@ public void listAndroidAppDataStreams( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAndroidAppDataStreams, expected %s or %s", + response.getClass().getName(), + ListAndroidAppDataStreamsResponse.class.getName(), + Exception.class.getName()))); } } @@ -618,7 +834,13 @@ public void getEnhancedMeasurementSettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnhancedMeasurementSettings, expected %s or %s", + response.getClass().getName(), + EnhancedMeasurementSettings.class.getName(), + Exception.class.getName()))); } } @@ -634,7 +856,13 @@ public void updateEnhancedMeasurementSettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEnhancedMeasurementSettings, expected %s or %s", + response.getClass().getName(), + EnhancedMeasurementSettings.class.getName(), + Exception.class.getName()))); } } @@ -649,7 +877,13 @@ public void createFirebaseLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateFirebaseLink, expected %s or %s", + response.getClass().getName(), + FirebaseLink.class.getName(), + Exception.class.getName()))); } } @@ -664,7 +898,13 @@ public void updateFirebaseLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateFirebaseLink, expected %s or %s", + response.getClass().getName(), + FirebaseLink.class.getName(), + Exception.class.getName()))); } } @@ -679,7 +919,13 @@ public void deleteFirebaseLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteFirebaseLink, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -695,7 +941,13 @@ public void listFirebaseLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListFirebaseLinks, expected %s or %s", + response.getClass().getName(), + ListFirebaseLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -710,7 +962,13 @@ public void getGlobalSiteTag( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetGlobalSiteTag, expected %s or %s", + response.getClass().getName(), + GlobalSiteTag.class.getName(), + Exception.class.getName()))); } } @@ -725,7 +983,13 @@ public void createGoogleAdsLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateGoogleAdsLink, expected %s or %s", + response.getClass().getName(), + GoogleAdsLink.class.getName(), + Exception.class.getName()))); } } @@ -740,7 +1004,13 @@ public void updateGoogleAdsLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateGoogleAdsLink, expected %s or %s", + response.getClass().getName(), + GoogleAdsLink.class.getName(), + Exception.class.getName()))); } } @@ -755,7 +1025,13 @@ public void deleteGoogleAdsLink( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteGoogleAdsLink, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -771,7 +1047,13 @@ public void listGoogleAdsLinks( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListGoogleAdsLinks, expected %s or %s", + response.getClass().getName(), + ListGoogleAdsLinksResponse.class.getName(), + Exception.class.getName()))); } } @@ -786,7 +1068,13 @@ public void getDataSharingSettings( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataSharingSettings, expected %s or %s", + response.getClass().getName(), + DataSharingSettings.class.getName(), + Exception.class.getName()))); } } } diff --git a/grpc-google-analytics-admin-v1alpha/pom.xml b/grpc-google-analytics-admin-v1alpha/pom.xml index dcd5f5c6..bf3962d6 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.3.0 + 0.3.1 grpc-google-analytics-admin-v1alpha GRPC library for grpc-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.3.0 + 0.3.1 diff --git a/pom.xml b/pom.xml index 220a4242..42f0376d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-admin-parent pom - 0.3.0 + 0.3.1 Google Analytics Admin Parent https://github.com/googleapis/java-analytics-admin @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.4 + 0.10.0 @@ -70,23 +70,23 @@ com.google.analytics google-analytics-admin - 0.3.0 + 0.3.1 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.3.0 + 0.3.1 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.3.0 + 0.3.1 com.google.cloud google-cloud-shared-dependencies - 0.18.0 + 0.19.0 pom import @@ -94,7 +94,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/proto-google-analytics-admin-v1alpha/pom.xml b/proto-google-analytics-admin-v1alpha/pom.xml index f6dabf4e..635f8177 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.3.0 + 0.3.1 proto-google-analytics-admin-v1alpha PROTO library for proto-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.3.0 + 0.3.1 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index e826efdc..098f4496 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.2.5 + 0.3.0 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 7e86d879..9fb46d65 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,20 +28,20 @@ com.google.analytics google-analytics-admin - 0.3.0 + 0.3.1 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 305b320e..68739a4f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,19 +27,19 @@ com.google.analytics google-analytics-admin - 0.3.0 + 0.3.1 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.1 + 1.1.2 test diff --git a/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java b/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java index e07f59bd..348383c2 100644 --- a/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java +++ b/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java @@ -77,7 +77,7 @@ static void listAccounts() throws Exception { for (Account account : page.iterateAll()) { System.out.printf("Account name: %s%n", account.getName()); System.out.printf("Display name: %s%n", account.getDisplayName()); - System.out.printf("Country code: %s%n", account.getCountryCode()); + System.out.printf("Country code: %s%n", account.getRegionCode()); System.out.printf("Create time: %s%n", account.getCreateTime().getSeconds()); System.out.printf("Update time: %s%n", account.getUpdateTime().getSeconds()); System.out.println(); diff --git a/synth.metadata b/synth.metadata index 528f9877..be8b54d4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,33 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-admin.git", - "sha": "9d0aa7c5f61dd0dd10b8e3efd1f4d627dc16f70e" + "sha": "f329dc74b5a29b35d5efb97e611cb5f6ced2d746" } }, { "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "23e7356f4cf449d6e9977698c5d9383b566be7af", - "internalRef": "351651504" + "name": "googleapis-gen", + "remote": "https://github.com/googleapis/googleapis-gen.git", + "sha": "9d14cd16d94886f7f10a243e1b5a6876946f32bb", + "internalRef": "358516065" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "analytics-admin", - "apiVersion": "v1alpha", - "language": "java", - "generator": "bazel" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], @@ -59,7 +48,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", @@ -91,6 +79,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", @@ -102,6 +92,7 @@ "codecov.yaml", "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceClient.java", "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java", + "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/gapic_metadata.json", "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/package-info.java", "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java", "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java", diff --git a/synth.py b/synth.py index a96b027c..4fef65b8 100644 --- a/synth.py +++ b/synth.py @@ -14,20 +14,17 @@ """This script is used to synthesize generated parts of this library.""" -import synthtool as s -import synthtool.gcp as gcp import synthtool.languages.java as java service = 'analytics-admin' versions = ['v1alpha'] for version in versions: - java.bazel_library( - service=service, - version=version, - proto_path=f'google/analytics/admin/{version}', - bazel_target=f'//google/analytics/admin/{version}:google-{service}-{version}-java', - cloud_api=False, + java.pregenerated_library( + service=service, + version=version, + path=f'google/analytics/admin/{version}', + cloud_api=False, ) java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt index ab7ec29b..420def55 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-analytics-admin:0.3.0:0.3.0 -proto-google-analytics-admin-v1alpha:0.3.0:0.3.0 -grpc-google-analytics-admin-v1alpha:0.3.0:0.3.0 \ No newline at end of file +google-analytics-admin:0.3.1:0.3.1 +proto-google-analytics-admin-v1alpha:0.3.1:0.3.1 +grpc-google-analytics-admin-v1alpha:0.3.1:0.3.1 \ No newline at end of file