diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 7245a135..63f08852 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": "683bae0c885583083eadfd313f1f7aa75f2437c9" + "sha": "94132548399054d4c3ff74db09fc93661a979717" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "996775eca5fd934edac3c2ae34b80ff0395b1717" } } ] diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index a6f78bf2..83cc0ac3 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -q -DskipTests=true -NAME=google-analytics-admin -VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) +export NAME=google-analytics-admin +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs mvn site -B -q @@ -59,7 +59,8 @@ python3 -m docuploader upload . \ popd -# V2 +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" pushd target/devsite/reference diff --git a/CHANGELOG.md b/CHANGELOG.md index d8815495..c00f06c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.2.4](https://www.github.com/googleapis/java-analytics-admin/compare/v0.2.3...v0.2.4) (2020-12-14) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([#122](https://www.github.com/googleapis/java-analytics-admin/issues/122)) ([2a6832b](https://www.github.com/googleapis/java-analytics-admin/commit/2a6832badbd82e8ab5e8c17dac0a0de23470074d)) + ### [0.2.3](https://www.github.com/googleapis/java-analytics-admin/compare/v0.2.2...v0.2.3) (2020-12-02) diff --git a/README.md b/README.md index 5695810b..1ad5ce61 100644 --- a/README.md +++ b/README.md @@ -20,17 +20,17 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-admin - 0.2.1 + 0.2.3 ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.analytics:google-analytics-admin:0.2.1' +compile 'com.google.analytics:google-analytics-admin:0.2.3' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.2.1" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.2.3" ``` ## Authentication @@ -121,6 +121,8 @@ Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] +Java is a registered trademark of Oracle and/or its affiliates. + [product-docs]: https://developers.google.com/analytics [javadocs]: https://googleapis.dev/java/google-analytics-admin/latest/index.html [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-analytics-admin/java7.svg diff --git a/google-analytics-admin-bom/pom.xml b/google-analytics-admin-bom/pom.xml index 59b9ed44..e756a658 100644 --- a/google-analytics-admin-bom/pom.xml +++ b/google-analytics-admin-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.analytics google-analytics-admin-bom - 0.2.3 + 0.2.4 pom com.google.cloud @@ -68,17 +68,17 @@ com.google.analytics google-analytics-admin - 0.2.3 + 0.2.4 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.2.3 + 0.2.4 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.2.3 + 0.2.4 diff --git a/google-analytics-admin/pom.xml b/google-analytics-admin/pom.xml index c6d32c02..fb285a45 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.2.3 + 0.2.4 jar Google Analytics Admin https://github.com/googleapis/java-analytics-admin @@ -11,7 +11,7 @@ com.google.analytics google-analytics-admin-parent - 0.2.3 + 0.2.4 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 b409c775..7ac8c147 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 @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha; import com.google.analytics.admin.v1alpha.stub.AnalyticsAdminServiceStub; @@ -35,23 +36,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND SERVICE +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Service Description: Service Interface for the Analytics Admin API (GA4). * *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * - *

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

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(). * @@ -80,30 +72,28 @@ * *

To customize credentials: * - *

- * 
+ * 
{@code
  * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
  *     AnalyticsAdminServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
  *         .build();
  * AnalyticsAdminServiceClient analyticsAdminServiceClient =
  *     AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
- * 
- * 
+ * }
* - * To customize the endpoint: + *

To customize the endpoint: * - *

- * 
+ * 
{@code
  * AnalyticsAdminServiceSettings analyticsAdminServiceSettings =
  *     AnalyticsAdminServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * AnalyticsAdminServiceClient analyticsAdminServiceClient =
  *     AnalyticsAdminServiceClient.create(analyticsAdminServiceSettings);
- * 
- * 
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator") public class AnalyticsAdminServiceClient implements BackgroundResource { private final AnalyticsAdminServiceSettings settings; private final AnalyticsAdminServiceStub stub; @@ -124,7 +114,7 @@ public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceSett /** * Constructs an instance of AnalyticsAdminServiceClient, using the given stub for making calls. - * This is for advanced usage - prefer to use AnalyticsAdminServiceSettings}. + * This is for advanced usage - prefer using create(AnalyticsAdminServiceSettings). */ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final AnalyticsAdminServiceClient create(AnalyticsAdminServiceStub stub) { @@ -156,20 +146,11 @@ public AnalyticsAdminServiceStub getStub() { return stub; } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single Account. Throws "Target not found" if no such account found, or if caller * does not have permissions to access it. * - *

Sample 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 @@ -180,20 +161,11 @@ public final Account getAccount(AccountName name) { return getAccount(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single Account. Throws "Target not found" if no such account found, or if caller * does not have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   Account response = analyticsAdminServiceClient.getAccount(name.toString());
-   * }
-   * 
- * * @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 @@ -203,23 +175,11 @@ public final Account getAccount(String name) { return getAccount(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single Account. Throws "Target not found" if no such account found, or if caller * does not have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   GetAccountRequest request = GetAccountRequest.newBuilder()
-   *     .setName(name.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 */ @@ -227,30 +187,18 @@ public final Account getAccount(GetAccountRequest request) { return getAccountCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single Account. Throws "Target not found" if no such account found, or if caller * does not have permissions to access it. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   GetAccountRequest request = GetAccountRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Account> future = analyticsAdminServiceClient.getAccountCallable().futureCall(request);
-   *   // Do something
-   *   Account response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getAccountCallable() { return stub.getAccountCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns all accounts accessible by the caller. * @@ -258,17 +206,6 @@ public final UnaryCallable getAccountCallable() { * "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are * found. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ListAccountsRequest request = ListAccountsRequest.newBuilder().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 */ @@ -276,7 +213,7 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) return listAccountsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns all accounts accessible by the caller. * @@ -285,24 +222,13 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) * found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ListAccountsRequest request = ListAccountsRequest.newBuilder().build();
-   *   ApiFuture<ListAccountsPagedResponse> future = analyticsAdminServiceClient.listAccountsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Account element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listAccountsPagedCallable() { return stub.listAccountsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns all accounts accessible by the caller. * @@ -311,30 +237,12 @@ public final ListAccountsPagedResponse listAccounts(ListAccountsRequest request) * found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ListAccountsRequest request = ListAccountsRequest.newBuilder().build();
-   *   while (true) {
-   *     ListAccountsResponse response = analyticsAdminServiceClient.listAccountsCallable().call(request);
-   *     for (Account element : response.getAccountsList()) {
-   *       // 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(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Account as soft-deleted (ie: "trashed") and returns it. * @@ -347,15 +255,6 @@ public final UnaryCallable listAccoun * *

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

Sample 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 @@ -366,7 +265,7 @@ public final void deleteAccount(AccountName name) { deleteAccount(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Account as soft-deleted (ie: "trashed") and returns it. * @@ -379,15 +278,6 @@ public final void deleteAccount(AccountName name) { * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   analyticsAdminServiceClient.deleteAccount(name.toString());
-   * }
-   * 
- * * @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 @@ -397,7 +287,7 @@ public final void deleteAccount(String name) { deleteAccount(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Account as soft-deleted (ie: "trashed") and returns it. * @@ -410,18 +300,6 @@ public final void deleteAccount(String name) { * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   DeleteAccountRequest request = DeleteAccountRequest.newBuilder()
-   *     .setName(name.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 */ @@ -429,7 +307,7 @@ public final void deleteAccount(DeleteAccountRequest request) { deleteAccountCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Account as soft-deleted (ie: "trashed") and returns it. * @@ -443,37 +321,15 @@ public final void deleteAccount(DeleteAccountRequest request) { *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName name = AccountName.of("[ACCOUNT]");
-   *   DeleteAccountRequest request = DeleteAccountRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteAccountCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteAccountCallable() { return stub.deleteAccountCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an account. * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. @@ -485,22 +341,10 @@ public final Account updateAccount(Account account, FieldMask updateMask) { return updateAccount(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an account. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Account account = Account.newBuilder().build();
-   *   UpdateAccountRequest request = UpdateAccountRequest.newBuilder()
-   *     .setAccount(account)
-   *     .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 */ @@ -508,41 +352,20 @@ public final Account updateAccount(UpdateAccountRequest request) { return updateAccountCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an account. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Account account = Account.newBuilder().build();
-   *   UpdateAccountRequest request = UpdateAccountRequest.newBuilder()
-   *     .setAccount(account)
-   *     .build();
-   *   ApiFuture<Account> future = analyticsAdminServiceClient.updateAccountCallable().futureCall(request);
-   *   // Do something
-   *   Account response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateAccountCallable() { return stub.updateAccountCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Requests a ticket for creating an account. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ProvisionAccountTicketRequest request = ProvisionAccountTicketRequest.newBuilder().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 */ @@ -551,41 +374,21 @@ public final ProvisionAccountTicketResponse provisionAccountTicket( return provisionAccountTicketCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Requests a ticket for creating an account. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ProvisionAccountTicketRequest request = ProvisionAccountTicketRequest.newBuilder().build();
-   *   ApiFuture<ProvisionAccountTicketResponse> future = analyticsAdminServiceClient.provisionAccountTicketCallable().futureCall(request);
-   *   // Do something
-   *   ProvisionAccountTicketResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable provisionAccountTicketCallable() { return stub.provisionAccountTicketCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns summaries of all accounts accessible by the caller. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build();
-   *   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 */ @@ -594,73 +397,35 @@ public final ListAccountSummariesPagedResponse listAccountSummaries( return listAccountSummariesPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns summaries of all accounts accessible by the caller. * *

Sample code: - * - *


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

Sample code: - * - *


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

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

Sample code: - * - *


-   * 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 @@ -671,22 +436,13 @@ public final Property getProperty(PropertyName name) { return getProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single "GA4" Property. * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   Property response = analyticsAdminServiceClient.getProperty(name.toString());
-   * }
-   * 
- * * @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 @@ -696,25 +452,13 @@ public final Property getProperty(String name) { return getProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single "GA4" Property. * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   GetPropertyRequest request = GetPropertyRequest.newBuilder()
-   *     .setName(name.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 */ @@ -722,7 +466,7 @@ public final Property getProperty(GetPropertyRequest request) { return getPropertyCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single "GA4" Property. * @@ -730,24 +474,12 @@ public final Property getProperty(GetPropertyRequest request) { * or if caller does not have permissions to access it. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   GetPropertyRequest request = GetPropertyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Property> future = analyticsAdminServiceClient.getPropertyCallable().futureCall(request);
-   *   // Do something
-   *   Property response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getPropertyCallable() { return stub.getPropertyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child Properties under the specified parent Account. * @@ -755,20 +487,6 @@ 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   String filter = "";
-   *   ListPropertiesRequest request = ListPropertiesRequest.newBuilder()
-   *     .setFilter(filter)
-   *     .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 */ @@ -776,7 +494,7 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re return listPropertiesPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child Properties under the specified parent Account. * @@ -785,27 +503,13 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re * list if no relevant properties are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   String filter = "";
-   *   ListPropertiesRequest request = ListPropertiesRequest.newBuilder()
-   *     .setFilter(filter)
-   *     .build();
-   *   ApiFuture<ListPropertiesPagedResponse> future = analyticsAdminServiceClient.listPropertiesPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (Property element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listPropertiesPagedCallable() { return stub.listPropertiesPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child Properties under the specified parent Account. * @@ -814,46 +518,16 @@ public final ListPropertiesPagedResponse listProperties(ListPropertiesRequest re * list if no relevant properties are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   String filter = "";
-   *   ListPropertiesRequest request = ListPropertiesRequest.newBuilder()
-   *     .setFilter(filter)
-   *     .build();
-   *   while (true) {
-   *     ListPropertiesResponse response = analyticsAdminServiceClient.listPropertiesCallable().call(request);
-   *     for (Property element : response.getPropertiesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listPropertiesCallable() { return stub.listPropertiesCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an "GA4" property with the specified location and attributes. * - *

Sample 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 @@ -864,22 +538,10 @@ public final Property createProperty(Property property) { return createProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an "GA4" property with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Property property = Property.newBuilder().build();
-   *   CreatePropertyRequest request = CreatePropertyRequest.newBuilder()
-   *     .setProperty(property)
-   *     .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 */ @@ -887,29 +549,17 @@ public final Property createProperty(CreatePropertyRequest request) { return createPropertyCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an "GA4" property with the specified location and attributes. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Property property = Property.newBuilder().build();
-   *   CreatePropertyRequest request = CreatePropertyRequest.newBuilder()
-   *     .setProperty(property)
-   *     .build();
-   *   ApiFuture<Property> future = analyticsAdminServiceClient.createPropertyCallable().futureCall(request);
-   *   // Do something
-   *   Property response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createPropertyCallable() { return stub.createPropertyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Property as soft-deleted (ie: "trashed") and returns it. * @@ -922,15 +572,6 @@ public final UnaryCallable createPropertyCallab * *

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

Sample 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 @@ -941,7 +582,7 @@ public final void deleteProperty(PropertyName name) { deleteProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Property as soft-deleted (ie: "trashed") and returns it. * @@ -954,15 +595,6 @@ public final void deleteProperty(PropertyName name) { * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   analyticsAdminServiceClient.deleteProperty(name.toString());
-   * }
-   * 
- * * @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 @@ -972,7 +604,7 @@ public final void deleteProperty(String name) { deleteProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Property as soft-deleted (ie: "trashed") and returns it. * @@ -985,18 +617,6 @@ public final void deleteProperty(String name) { * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   DeletePropertyRequest request = DeletePropertyRequest.newBuilder()
-   *     .setName(name.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 */ @@ -1004,7 +624,7 @@ public final void deleteProperty(DeletePropertyRequest request) { deletePropertyCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Marks target Property as soft-deleted (ie: "trashed") and returns it. * @@ -1018,37 +638,15 @@ public final void deleteProperty(DeletePropertyRequest request) { *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName name = PropertyName.of("[PROPERTY]");
-   *   DeletePropertyRequest request = DeletePropertyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deletePropertyCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deletePropertyCallable() { return stub.deletePropertyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a property. * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. @@ -1060,22 +658,10 @@ public final Property updateProperty(Property property, FieldMask updateMask) { return updateProperty(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Property property = Property.newBuilder().build();
-   *   UpdatePropertyRequest request = UpdatePropertyRequest.newBuilder()
-   *     .setProperty(property)
-   *     .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 */ @@ -1083,41 +669,20 @@ public final Property updateProperty(UpdatePropertyRequest request) { return updatePropertyCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   Property property = Property.newBuilder().build();
-   *   UpdatePropertyRequest request = UpdatePropertyRequest.newBuilder()
-   *     .setProperty(property)
-   *     .build();
-   *   ApiFuture<Property> future = analyticsAdminServiceClient.updatePropertyCallable().futureCall(request);
-   *   // Do something
-   *   Property response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updatePropertyCallable() { return stub.updatePropertyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a user's link to an account or property. * - *

Sample 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 */ @@ -1127,19 +692,10 @@ public final UserLink getUserLink(UserLinkName name) { return getUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a user's link to an account or property. * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
-   *   GetUserLinkRequest request = GetUserLinkRequest.newBuilder()
-   *     .setName(name.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 */ @@ -1171,46 +715,20 @@ public final UserLink getUserLink(GetUserLinkRequest request) { return getUserLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about a user's link to an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
-   *   GetUserLinkRequest request = GetUserLinkRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<UserLink> future = analyticsAdminServiceClient.getUserLinkCallable().futureCall(request);
-   *   // Do something
-   *   UserLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getUserLinkCallable() { return stub.getUserLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about multiple users' links to an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<UserLinkName> names = new ArrayList<>();
-   *   BatchGetUserLinksRequest request = BatchGetUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllNames(UserLinkName.toStringList(names))
-   *     .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 */ @@ -1218,46 +736,21 @@ public final BatchGetUserLinksResponse batchGetUserLinks(BatchGetUserLinksReques return batchGetUserLinksCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets information about multiple users' links to an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<UserLinkName> names = new ArrayList<>();
-   *   BatchGetUserLinksRequest request = BatchGetUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllNames(UserLinkName.toStringList(names))
-   *     .build();
-   *   ApiFuture<BatchGetUserLinksResponse> future = analyticsAdminServiceClient.batchGetUserLinksCallable().futureCall(request);
-   *   // Do something
-   *   BatchGetUserLinksResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable batchGetUserLinksCallable() { return stub.batchGetUserLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * - *

Sample 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 */ @@ -1269,21 +762,10 @@ public final ListUserLinksPagedResponse listUserLinks(AccountName parent) { return listUserLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * - *

Sample 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 */ @@ -1295,21 +777,10 @@ public final ListUserLinksPagedResponse listUserLinks(PropertyName parent) { return listUserLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   for (UserLink element : analyticsAdminServiceClient.listUserLinks(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. Example format: accounts/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1318,24 +789,10 @@ public final ListUserLinksPagedResponse listUserLinks(String parent) { return listUserLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   ListUserLinksRequest request = ListUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -1343,63 +800,28 @@ public final ListUserLinksPagedResponse listUserLinks(ListUserLinksRequest reque return listUserLinksPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   ListUserLinksRequest request = ListUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListUserLinksPagedResponse> future = analyticsAdminServiceClient.listUserLinksPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (UserLink element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listUserLinksPagedCallable() { return stub.listUserLinksPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   ListUserLinksRequest request = ListUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListUserLinksResponse response = analyticsAdminServiceClient.listUserLinksCallable().call(request);
-   *     for (UserLink element : response.getUserLinksList()) {
-   *       // 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(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property, including implicit ones that come from * effective permissions granted by groups or organization admin roles. @@ -1409,20 +831,6 @@ public final UnaryCallable listUser * group/etc that gives them permissions, which is currently only usable/discoverable in the GA or * GMP UIs. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   AuditUserLinksRequest request = AuditUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -1430,7 +838,7 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re return auditUserLinksPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property, including implicit ones that come from * effective permissions granted by groups or organization admin roles. @@ -1441,27 +849,13 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * GMP UIs. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   AuditUserLinksRequest request = AuditUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<AuditUserLinksPagedResponse> future = analyticsAdminServiceClient.auditUserLinksPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (AuditUserLink element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable auditUserLinksPagedCallable() { return stub.auditUserLinksPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all user links on an account or property, including implicit ones that come from * effective permissions granted by groups or organization admin roles. @@ -1472,34 +866,13 @@ public final AuditUserLinksPagedResponse auditUserLinks(AuditUserLinksRequest re * GMP UIs. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   AuditUserLinksRequest request = AuditUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     AuditUserLinksResponse response = analyticsAdminServiceClient.auditUserLinksCallable().call(request);
-   *     for (AuditUserLink element : response.getUserLinksList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable auditUserLinksCallable() { return stub.auditUserLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a user link on an account or property. * @@ -1507,16 +880,6 @@ 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: - * - *


-   * 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 @@ -1530,7 +893,7 @@ public final UserLink createUserLink(AccountName parent, UserLink userLink) { return createUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a user link on an account or property. * @@ -1538,16 +901,6 @@ 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: - * - *


-   * 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 @@ -1561,7 +914,7 @@ public final UserLink createUserLink(PropertyName parent, UserLink userLink) { return createUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a user link on an account or property. * @@ -1569,16 +922,6 @@ 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   UserLink userLink = UserLink.newBuilder().build();
-   *   UserLink response = analyticsAdminServiceClient.createUserLink(parent.toString(), 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 @@ -1589,7 +932,7 @@ public final UserLink createUserLink(String parent, UserLink userLink) { return createUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a user link on an account or property. * @@ -1597,20 +940,6 @@ 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   UserLink userLink = UserLink.newBuilder().build();
-   *   CreateUserLinkRequest request = CreateUserLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setUserLink(userLink)
-   *     .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 */ @@ -1618,7 +947,7 @@ public final UserLink createUserLink(CreateUserLinkRequest request) { return createUserLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a user link on an account or property. * @@ -1627,46 +956,18 @@ public final UserLink createUserLink(CreateUserLinkRequest request) { * UserLink. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   UserLink userLink = UserLink.newBuilder().build();
-   *   CreateUserLinkRequest request = CreateUserLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setUserLink(userLink)
-   *     .build();
-   *   ApiFuture<UserLink> future = analyticsAdminServiceClient.createUserLinkCallable().futureCall(request);
-   *   // Do something
-   *   UserLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createUserLinkCallable() { return stub.createUserLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates information about multiple users' links to an account or property. * *

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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<CreateUserLinkRequest> requests = new ArrayList<>();
-   *   BatchCreateUserLinksRequest request = BatchCreateUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .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 */ @@ -1675,7 +976,7 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( return batchCreateUserLinksCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates information about multiple users' links to an account or property. * @@ -1683,39 +984,16 @@ public final BatchCreateUserLinksResponse batchCreateUserLinks( * be created. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<CreateUserLinkRequest> requests = new ArrayList<>();
-   *   BatchCreateUserLinksRequest request = BatchCreateUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .build();
-   *   ApiFuture<BatchCreateUserLinksResponse> future = analyticsAdminServiceClient.batchCreateUserLinksCallable().futureCall(request);
-   *   // Do something
-   *   BatchCreateUserLinksResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable batchCreateUserLinksCallable() { return stub.batchCreateUserLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a user link on an account or property. * - *

Sample 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 */ @@ -1725,22 +1003,10 @@ public final UserLink updateUserLink(UserLink userLink) { return updateUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a user link on an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLink userLink = UserLink.newBuilder().build();
-   *   UpdateUserLinkRequest request = UpdateUserLinkRequest.newBuilder()
-   *     .setUserLink(userLink)
-   *     .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 */ @@ -1748,46 +1014,20 @@ public final UserLink updateUserLink(UpdateUserLinkRequest request) { return updateUserLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a user link on an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLink userLink = UserLink.newBuilder().build();
-   *   UpdateUserLinkRequest request = UpdateUserLinkRequest.newBuilder()
-   *     .setUserLink(userLink)
-   *     .build();
-   *   ApiFuture<UserLink> future = analyticsAdminServiceClient.updateUserLinkCallable().futureCall(request);
-   *   // Do something
-   *   UserLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateUserLinkCallable() { return stub.updateUserLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates information about multiple users' links to an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<UpdateUserLinkRequest> requests = new ArrayList<>();
-   *   BatchUpdateUserLinksRequest request = BatchUpdateUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .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 */ @@ -1796,44 +1036,21 @@ public final BatchUpdateUserLinksResponse batchUpdateUserLinks( return batchUpdateUserLinksCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates information about multiple users' links to an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<UpdateUserLinkRequest> requests = new ArrayList<>();
-   *   BatchUpdateUserLinksRequest request = BatchUpdateUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .build();
-   *   ApiFuture<BatchUpdateUserLinksResponse> future = analyticsAdminServiceClient.batchUpdateUserLinksCallable().futureCall(request);
-   *   // Do something
-   *   BatchUpdateUserLinksResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable batchUpdateUserLinksCallable() { return stub.batchUpdateUserLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a user link on an account or property. * - *

Sample 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 */ @@ -1843,19 +1060,10 @@ public final void deleteUserLink(UserLinkName name) { deleteUserLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a user link on an account or property. * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
-   *   DeleteUserLinkRequest request = DeleteUserLinkRequest.newBuilder()
-   *     .setName(name.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 */ @@ -1887,46 +1083,20 @@ public final void deleteUserLink(DeleteUserLinkRequest request) { deleteUserLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a user link on an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]");
-   *   DeleteUserLinkRequest request = DeleteUserLinkRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteUserLinkCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteUserLinkCallable() { return stub.deleteUserLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes information about multiple users' links to an account or property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<DeleteUserLinkRequest> requests = new ArrayList<>();
-   *   BatchDeleteUserLinksRequest request = BatchDeleteUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .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 */ @@ -1934,46 +1104,23 @@ public final void batchDeleteUserLinks(BatchDeleteUserLinksRequest request) { batchDeleteUserLinksCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes information about multiple users' links to an account or property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AccountName parent = AccountName.of("[ACCOUNT]");
-   *   List<DeleteUserLinkRequest> requests = new ArrayList<>();
-   *   BatchDeleteUserLinksRequest request = BatchDeleteUserLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllRequests(requests)
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.batchDeleteUserLinksCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable batchDeleteUserLinksCallable() { return stub.batchDeleteUserLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single WebDataStream * *

Throws "Target not found" if no such web data stream found, or if the caller does not have * permissions to access it. * - *

Sample 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" @@ -1985,22 +1132,13 @@ public final WebDataStream getWebDataStream(WebDataStreamName name) { return getWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single WebDataStream * *

Throws "Target not found" if no such web data stream found, or if the caller does not have * permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   WebDataStream response = analyticsAdminServiceClient.getWebDataStream(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the web data stream to lookup. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -2011,25 +1149,13 @@ public final WebDataStream getWebDataStream(String name) { return getWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single WebDataStream * *

Throws "Target not found" if no such web data stream found, or if the caller does not have * permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   GetWebDataStreamRequest request = GetWebDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -2037,7 +1163,7 @@ public final WebDataStream getWebDataStream(GetWebDataStreamRequest request) { return getWebDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single WebDataStream * @@ -2045,36 +1171,15 @@ public final WebDataStream getWebDataStream(GetWebDataStreamRequest request) { * permissions to access it. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   GetWebDataStreamRequest request = GetWebDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<WebDataStream> future = analyticsAdminServiceClient.getWebDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   WebDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getWebDataStreamCallable() { return stub.getWebDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a web stream on a property. * - *

Sample 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" @@ -2088,19 +1193,10 @@ public final void deleteWebDataStream(WebDataStreamName name) { deleteWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a web stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   analyticsAdminServiceClient.deleteWebDataStream(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the web data stream to delete. Format: * properties/{property_id}/webDataStreams/{stream_id} Example: * "properties/123/webDataStreams/456" @@ -2112,22 +1208,10 @@ public final void deleteWebDataStream(String name) { deleteWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a web stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   DeleteWebDataStreamRequest request = DeleteWebDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -2135,42 +1219,20 @@ public final void deleteWebDataStream(DeleteWebDataStreamRequest request) { deleteWebDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a web stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   DeleteWebDataStreamRequest request = DeleteWebDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteWebDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteWebDataStreamCallable() { return stub.deleteWebDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a web stream on a property. * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. @@ -2186,22 +1248,10 @@ public final WebDataStream updateWebDataStream( return updateWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a web stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
-   *   UpdateWebDataStreamRequest request = UpdateWebDataStreamRequest.newBuilder()
-   *     .setWebDataStream(webDataStream)
-   *     .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 */ @@ -2209,43 +1259,21 @@ public final WebDataStream updateWebDataStream(UpdateWebDataStreamRequest reques return updateWebDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a web stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
-   *   UpdateWebDataStreamRequest request = UpdateWebDataStreamRequest.newBuilder()
-   *     .setWebDataStream(webDataStream)
-   *     .build();
-   *   ApiFuture<WebDataStream> future = analyticsAdminServiceClient.updateWebDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   WebDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateWebDataStreamCallable() { return stub.updateWebDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a web stream with the specified location and attributes. * - *

Sample 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. @@ -2260,20 +1288,10 @@ public final WebDataStream createWebDataStream(PropertyName parent, WebDataStrea return createWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a web stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
-   *   WebDataStream response = analyticsAdminServiceClient.createWebDataStream(parent.toString(), 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. @@ -2288,24 +1306,10 @@ public final WebDataStream createWebDataStream(String parent, WebDataStream webD return createWebDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a web stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateWebDataStreamRequest request = CreateWebDataStreamRequest.newBuilder()
-   *     .setWebDataStream(webDataStream)
-   *     .setParent(parent.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 */ @@ -2313,49 +1317,24 @@ public final WebDataStream createWebDataStream(CreateWebDataStreamRequest reques return createWebDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a web stream with the specified location and attributes. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   WebDataStream webDataStream = WebDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateWebDataStreamRequest request = CreateWebDataStreamRequest.newBuilder()
-   *     .setWebDataStream(webDataStream)
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<WebDataStream> future = analyticsAdminServiceClient.createWebDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   WebDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createWebDataStreamCallable() { return stub.createWebDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child web data streams under the specified parent property. * *

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


-   * 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 @@ -2368,24 +1347,13 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(PropertyName par return listWebDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child web data streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   for (WebDataStream element : analyticsAdminServiceClient.listWebDataStreams(parent.toString()).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 @@ -2396,27 +1364,13 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams(String parent) { return listWebDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child web data streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListWebDataStreamsRequest request = ListWebDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -2425,7 +1379,7 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( return listWebDataStreamsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child web data streams under the specified parent property. * @@ -2433,27 +1387,13 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( * if no relevant web data streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListWebDataStreamsRequest request = ListWebDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListWebDataStreamsPagedResponse> future = analyticsAdminServiceClient.listWebDataStreamsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (WebDataStream element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listWebDataStreamsPagedCallable() { return stub.listWebDataStreamsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child web data streams under the specified parent property. * @@ -2461,49 +1401,19 @@ public final ListWebDataStreamsPagedResponse listWebDataStreams( * if no relevant web data streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListWebDataStreamsRequest request = ListWebDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListWebDataStreamsResponse response = analyticsAdminServiceClient.listWebDataStreamsCallable().call(request);
-   *     for (WebDataStream element : response.getWebDataStreamsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listWebDataStreamsCallable() { return stub.listWebDataStreamsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single IosAppDataStream * *

Throws "Target not found" if no such iOS app data stream found, or if the caller does not * have permissions to access it. * - *

Sample 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" @@ -2517,22 +1427,13 @@ public final IosAppDataStream getIosAppDataStream(IosAppDataStreamName name) { return getIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single IosAppDataStream * *

Throws "Target not found" if no such iOS app data stream found, or if the caller does not * have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   IosAppDataStream response = analyticsAdminServiceClient.getIosAppDataStream(name.toString());
-   * }
-   * 
- * * @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" @@ -2544,25 +1445,13 @@ public final IosAppDataStream getIosAppDataStream(String name) { return getIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single IosAppDataStream * *

Throws "Target not found" if no such iOS app data stream found, or if the caller does not * have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   GetIosAppDataStreamRequest request = GetIosAppDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -2570,7 +1459,7 @@ public final IosAppDataStream getIosAppDataStream(GetIosAppDataStreamRequest req return getIosAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single IosAppDataStream * @@ -2578,37 +1467,16 @@ public final IosAppDataStream getIosAppDataStream(GetIosAppDataStreamRequest req * have permissions to access it. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   GetIosAppDataStreamRequest request = GetIosAppDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<IosAppDataStream> future = analyticsAdminServiceClient.getIosAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   IosAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getIosAppDataStreamCallable() { return stub.getIosAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an iOS app stream on a property. * - *

Sample 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" @@ -2622,19 +1490,10 @@ public final void deleteIosAppDataStream(IosAppDataStreamName name) { deleteIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an iOS app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   analyticsAdminServiceClient.deleteIosAppDataStream(name.toString());
-   * }
-   * 
- * * @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" @@ -2646,22 +1505,10 @@ public final void deleteIosAppDataStream(String name) { deleteIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an iOS app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   DeleteIosAppDataStreamRequest request = DeleteIosAppDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -2669,43 +1516,21 @@ public final void deleteIosAppDataStream(DeleteIosAppDataStreamRequest request) deleteIosAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an iOS app stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]");
-   *   DeleteIosAppDataStreamRequest request = DeleteIosAppDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteIosAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteIosAppDataStreamCallable() { return stub.deleteIosAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an iOS app stream on a property. * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. @@ -2721,22 +1546,10 @@ public final IosAppDataStream updateIosAppDataStream( return updateIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an iOS app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
-   *   UpdateIosAppDataStreamRequest request = UpdateIosAppDataStreamRequest.newBuilder()
-   *     .setIosAppDataStream(iosAppDataStream)
-   *     .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 */ @@ -2744,43 +1557,21 @@ public final IosAppDataStream updateIosAppDataStream(UpdateIosAppDataStreamReque return updateIosAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an iOS app stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
-   *   UpdateIosAppDataStreamRequest request = UpdateIosAppDataStreamRequest.newBuilder()
-   *     .setIosAppDataStream(iosAppDataStream)
-   *     .build();
-   *   ApiFuture<IosAppDataStream> future = analyticsAdminServiceClient.updateIosAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   IosAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateIosAppDataStreamCallable() { return stub.updateIosAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an iOS app data stream with the specified location and attributes. * - *

Sample 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. @@ -2796,20 +1587,10 @@ public final IosAppDataStream createIosAppDataStream( return createIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an iOS app data stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
-   *   IosAppDataStream response = analyticsAdminServiceClient.createIosAppDataStream(parent.toString(), 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. @@ -2825,24 +1606,10 @@ public final IosAppDataStream createIosAppDataStream( return createIosAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an iOS app data stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateIosAppDataStreamRequest request = CreateIosAppDataStreamRequest.newBuilder()
-   *     .setIosAppDataStream(iosAppDataStream)
-   *     .setParent(parent.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 */ @@ -2850,49 +1617,24 @@ public final IosAppDataStream createIosAppDataStream(CreateIosAppDataStreamReque return createIosAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an iOS app data stream with the specified location and attributes. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateIosAppDataStreamRequest request = CreateIosAppDataStreamRequest.newBuilder()
-   *     .setIosAppDataStream(iosAppDataStream)
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<IosAppDataStream> future = analyticsAdminServiceClient.createIosAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   IosAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createIosAppDataStreamCallable() { return stub.createIosAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child iOS app data streams under the specified parent property. * *

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


-   * 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 @@ -2905,24 +1647,13 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(PropertyNa return listIosAppDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child iOS app data streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   for (IosAppDataStream element : analyticsAdminServiceClient.listIosAppDataStreams(parent.toString()).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 @@ -2933,27 +1664,13 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams(String par return listIosAppDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child iOS app data streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListIosAppDataStreamsRequest request = ListIosAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -2962,7 +1679,7 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( return listIosAppDataStreamsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child iOS app data streams under the specified parent property. * @@ -2970,27 +1687,13 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( * list if no relevant iOS app data streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListIosAppDataStreamsRequest request = ListIosAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListIosAppDataStreamsPagedResponse> future = analyticsAdminServiceClient.listIosAppDataStreamsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (IosAppDataStream element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listIosAppDataStreamsPagedCallable() { return stub.listIosAppDataStreamsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child iOS app data streams under the specified parent property. * @@ -2998,49 +1701,19 @@ public final ListIosAppDataStreamsPagedResponse listIosAppDataStreams( * list if no relevant iOS app data streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListIosAppDataStreamsRequest request = ListIosAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListIosAppDataStreamsResponse response = analyticsAdminServiceClient.listIosAppDataStreamsCallable().call(request);
-   *     for (IosAppDataStream element : response.getIosAppDataStreamsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listIosAppDataStreamsCallable() { return stub.listIosAppDataStreamsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single AndroidAppDataStream * *

Throws "Target not found" if no such android app data stream found, or if the caller does * not have permissions to access it. * - *

Sample 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" @@ -3054,22 +1727,13 @@ public final AndroidAppDataStream getAndroidAppDataStream(AndroidAppDataStreamNa return getAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single AndroidAppDataStream * *

Throws "Target not found" if no such android app data stream found, or if the caller does * not have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   AndroidAppDataStream response = analyticsAdminServiceClient.getAndroidAppDataStream(name.toString());
-   * }
-   * 
- * * @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" @@ -3081,25 +1745,13 @@ public final AndroidAppDataStream getAndroidAppDataStream(String name) { return getAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single AndroidAppDataStream * *

Throws "Target not found" if no such android app data stream found, or if the caller does * not have permissions to access it. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   GetAndroidAppDataStreamRequest request = GetAndroidAppDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -3108,7 +1760,7 @@ public final AndroidAppDataStream getAndroidAppDataStream( return getAndroidAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lookup for a single AndroidAppDataStream * @@ -3116,37 +1768,16 @@ public final AndroidAppDataStream getAndroidAppDataStream( * not have permissions to access it. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   GetAndroidAppDataStreamRequest request = GetAndroidAppDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<AndroidAppDataStream> future = analyticsAdminServiceClient.getAndroidAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   AndroidAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getAndroidAppDataStreamCallable() { return stub.getAndroidAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an android app stream on a property. * - *

Sample 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" @@ -3160,19 +1791,10 @@ public final void deleteAndroidAppDataStream(AndroidAppDataStreamName name) { deleteAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an android app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   analyticsAdminServiceClient.deleteAndroidAppDataStream(name.toString());
-   * }
-   * 
- * * @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" @@ -3184,22 +1806,10 @@ public final void deleteAndroidAppDataStream(String name) { deleteAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an android app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   DeleteAndroidAppDataStreamRequest request = DeleteAndroidAppDataStreamRequest.newBuilder()
-   *     .setName(name.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 */ @@ -3207,43 +1817,21 @@ public final void deleteAndroidAppDataStream(DeleteAndroidAppDataStreamRequest r deleteAndroidAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes an android app stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]");
-   *   DeleteAndroidAppDataStreamRequest request = DeleteAndroidAppDataStreamRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteAndroidAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteAndroidAppDataStreamCallable() { return stub.deleteAndroidAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an android app stream on a property. * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. @@ -3259,22 +1847,10 @@ public final AndroidAppDataStream updateAndroidAppDataStream( return updateAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an android app stream on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
-   *   UpdateAndroidAppDataStreamRequest request = UpdateAndroidAppDataStreamRequest.newBuilder()
-   *     .setAndroidAppDataStream(androidAppDataStream)
-   *     .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 */ @@ -3283,43 +1859,21 @@ public final AndroidAppDataStream updateAndroidAppDataStream( return updateAndroidAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an android app stream on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
-   *   UpdateAndroidAppDataStreamRequest request = UpdateAndroidAppDataStreamRequest.newBuilder()
-   *     .setAndroidAppDataStream(androidAppDataStream)
-   *     .build();
-   *   ApiFuture<AndroidAppDataStream> future = analyticsAdminServiceClient.updateAndroidAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   AndroidAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateAndroidAppDataStreamCallable() { return stub.updateAndroidAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an android app stream with the specified location and attributes. * - *

Sample 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. @@ -3335,20 +1889,10 @@ public final AndroidAppDataStream createAndroidAppDataStream( return createAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an android app stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
-   *   AndroidAppDataStream response = analyticsAdminServiceClient.createAndroidAppDataStream(parent.toString(), 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. @@ -3364,24 +1908,10 @@ public final AndroidAppDataStream createAndroidAppDataStream( return createAndroidAppDataStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an android app stream with the specified location and attributes. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateAndroidAppDataStreamRequest request = CreateAndroidAppDataStreamRequest.newBuilder()
-   *     .setAndroidAppDataStream(androidAppDataStream)
-   *     .setParent(parent.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 */ @@ -3390,49 +1920,24 @@ public final AndroidAppDataStream createAndroidAppDataStream( return createAndroidAppDataStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates an android app stream with the specified location and attributes. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build();
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   CreateAndroidAppDataStreamRequest request = CreateAndroidAppDataStreamRequest.newBuilder()
-   *     .setAndroidAppDataStream(androidAppDataStream)
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<AndroidAppDataStream> future = analyticsAdminServiceClient.createAndroidAppDataStreamCallable().futureCall(request);
-   *   // Do something
-   *   AndroidAppDataStream response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createAndroidAppDataStreamCallable() { return stub.createAndroidAppDataStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child android app streams under the specified parent property. * *

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


-   * 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 @@ -3446,24 +1951,13 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( return listAndroidAppDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child android app streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   for (AndroidAppDataStream element : analyticsAdminServiceClient.listAndroidAppDataStreams(parent.toString()).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 @@ -3474,27 +1968,13 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams(St return listAndroidAppDataStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child android app streams under the specified parent property. * *

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


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListAndroidAppDataStreamsRequest request = ListAndroidAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -3503,7 +1983,7 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( return listAndroidAppDataStreamsPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child android app streams under the specified parent property. * @@ -3511,20 +1991,6 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListAndroidAppDataStreamsRequest request = ListAndroidAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListAndroidAppDataStreamsPagedResponse> future = analyticsAdminServiceClient.listAndroidAppDataStreamsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (AndroidAppDataStream element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable< ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsPagedResponse> @@ -3532,7 +1998,7 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( return stub.listAndroidAppDataStreamsPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns child android app streams under the specified parent property. * @@ -3540,47 +2006,17 @@ public final ListAndroidAppDataStreamsPagedResponse listAndroidAppDataStreams( * list if no relevant android app streams are found. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListAndroidAppDataStreamsRequest request = ListAndroidAppDataStreamsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListAndroidAppDataStreamsResponse response = analyticsAdminServiceClient.listAndroidAppDataStreamsCallable().call(request);
-   *     for (AndroidAppDataStream element : response.getAndroidAppDataStreamsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listAndroidAppDataStreamsCallable() { return stub.listAndroidAppDataStreamsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * 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" @@ -3595,20 +2031,11 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( return getEnhancedMeasurementSettings(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   EnhancedMeasurementSettingsName name = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   EnhancedMeasurementSettings response = analyticsAdminServiceClient.getEnhancedMeasurementSettings(name.toString());
-   * }
-   * 
- * * @param name Required. The name of the settings to lookup. Format: *

properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: * "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" @@ -3620,23 +2047,11 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings(String n return getEnhancedMeasurementSettings(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   EnhancedMeasurementSettingsName name = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   GetEnhancedMeasurementSettingsRequest request = GetEnhancedMeasurementSettingsRequest.newBuilder()
-   *     .setName(name.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 */ @@ -3645,45 +2060,23 @@ public final EnhancedMeasurementSettings getEnhancedMeasurementSettings( return getEnhancedMeasurementSettingsCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   EnhancedMeasurementSettingsName name = EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]");
-   *   GetEnhancedMeasurementSettingsRequest request = GetEnhancedMeasurementSettingsRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<EnhancedMeasurementSettings> future = analyticsAdminServiceClient.getEnhancedMeasurementSettingsCallable().futureCall(request);
-   *   // Do something
-   *   EnhancedMeasurementSettings response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getEnhancedMeasurementSettingsCallable() { return stub.getEnhancedMeasurementSettingsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * 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 The list of fields to be updated. Omitted fields will not be updated. @@ -3699,23 +2092,11 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( return updateEnhancedMeasurementSettings(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   EnhancedMeasurementSettings enhancedMeasurementSettings = EnhancedMeasurementSettings.newBuilder().build();
-   *   UpdateEnhancedMeasurementSettingsRequest request = UpdateEnhancedMeasurementSettingsRequest.newBuilder()
-   *     .setEnhancedMeasurementSettings(enhancedMeasurementSettings)
-   *     .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 */ @@ -3724,46 +2105,24 @@ public final EnhancedMeasurementSettings updateEnhancedMeasurementSettings( return updateEnhancedMeasurementSettingsCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * 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: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   EnhancedMeasurementSettings enhancedMeasurementSettings = EnhancedMeasurementSettings.newBuilder().build();
-   *   UpdateEnhancedMeasurementSettingsRequest request = UpdateEnhancedMeasurementSettingsRequest.newBuilder()
-   *     .setEnhancedMeasurementSettings(enhancedMeasurementSettings)
-   *     .build();
-   *   ApiFuture<EnhancedMeasurementSettings> future = analyticsAdminServiceClient.updateEnhancedMeasurementSettingsCallable().futureCall(request);
-   *   // Do something
-   *   EnhancedMeasurementSettings response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateEnhancedMeasurementSettingsCallable() { return stub.updateEnhancedMeasurementSettingsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a FirebaseLink. * *

Properties can have at most one FirebaseLink. * - *

Sample 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 @@ -3777,22 +2136,12 @@ public final FirebaseLink createFirebaseLink(PropertyName parent, FirebaseLink f return createFirebaseLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a FirebaseLink. * *

Properties can have at most one FirebaseLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   FirebaseLink response = analyticsAdminServiceClient.createFirebaseLink(parent.toString(), 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 @@ -3806,26 +2155,12 @@ public final FirebaseLink createFirebaseLink(String parent, FirebaseLink firebas return createFirebaseLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a FirebaseLink. * *

Properties can have at most one FirebaseLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   CreateFirebaseLinkRequest request = CreateFirebaseLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setFirebaseLink(firebaseLink)
-   *     .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 */ @@ -3833,46 +2168,22 @@ public final FirebaseLink createFirebaseLink(CreateFirebaseLinkRequest request) return createFirebaseLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a FirebaseLink. * *

Properties can have at most one FirebaseLink. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   CreateFirebaseLinkRequest request = CreateFirebaseLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setFirebaseLink(firebaseLink)
-   *     .build();
-   *   ApiFuture<FirebaseLink> future = analyticsAdminServiceClient.createFirebaseLinkCallable().futureCall(request);
-   *   // Do something
-   *   FirebaseLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createFirebaseLinkCallable() { return stub.createFirebaseLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a FirebaseLink on a property * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -3886,22 +2197,10 @@ public final FirebaseLink updateFirebaseLink(FirebaseLink firebaseLink, FieldMas return updateFirebaseLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a FirebaseLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   UpdateFirebaseLinkRequest request = UpdateFirebaseLinkRequest.newBuilder()
-   *     .setFirebaseLink(firebaseLink)
-   *     .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 */ @@ -3909,41 +2208,20 @@ public final FirebaseLink updateFirebaseLink(UpdateFirebaseLinkRequest request) return updateFirebaseLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a FirebaseLink on a property * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   FirebaseLink firebaseLink = FirebaseLink.newBuilder().build();
-   *   UpdateFirebaseLinkRequest request = UpdateFirebaseLinkRequest.newBuilder()
-   *     .setFirebaseLink(firebaseLink)
-   *     .build();
-   *   ApiFuture<FirebaseLink> future = analyticsAdminServiceClient.updateFirebaseLinkCallable().futureCall(request);
-   *   // Do something
-   *   FirebaseLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateFirebaseLinkCallable() { return stub.updateFirebaseLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a FirebaseLink on a property * - *

Sample 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 @@ -3956,19 +2234,10 @@ public final void deleteFirebaseLink(FirebaseLinkName name) { deleteFirebaseLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a FirebaseLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
-   *   analyticsAdminServiceClient.deleteFirebaseLink(name.toString());
-   * }
-   * 
- * * @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 @@ -3979,22 +2248,10 @@ public final void deleteFirebaseLink(String name) { deleteFirebaseLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a FirebaseLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
-   *   DeleteFirebaseLinkRequest request = DeleteFirebaseLinkRequest.newBuilder()
-   *     .setName(name.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 */ @@ -4002,41 +2259,20 @@ public final void deleteFirebaseLink(DeleteFirebaseLinkRequest request) { deleteFirebaseLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a FirebaseLink on a property * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]");
-   *   DeleteFirebaseLinkRequest request = DeleteFirebaseLinkRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteFirebaseLinkCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteFirebaseLinkCallable() { return stub.deleteFirebaseLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListFirebaseLinksResponse response = analyticsAdminServiceClient.listFirebaseLinks(parent);
-   * }
-   * 
- * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -4048,19 +2284,10 @@ public final ListFirebaseLinksResponse listFirebaseLinks(PropertyName parent) { return listFirebaseLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListFirebaseLinksResponse response = analyticsAdminServiceClient.listFirebaseLinks(parent.toString());
-   * }
-   * 
- * * @param parent Required. Format: properties/{property_id} Example: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -4070,22 +2297,10 @@ public final ListFirebaseLinksResponse listFirebaseLinks(String parent) { return listFirebaseLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListFirebaseLinksRequest request = ListFirebaseLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ListFirebaseLinksResponse response = analyticsAdminServiceClient.listFirebaseLinks(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 */ @@ -4093,42 +2308,21 @@ public final ListFirebaseLinksResponse listFirebaseLinks(ListFirebaseLinksReques return listFirebaseLinksCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListFirebaseLinksRequest request = ListFirebaseLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListFirebaseLinksResponse> future = analyticsAdminServiceClient.listFirebaseLinksCallable().futureCall(request);
-   *   // Do something
-   *   ListFirebaseLinksResponse response = future.get();
-   * }
-   * 
*/ public final UnaryCallable listFirebaseLinksCallable() { return stub.listFirebaseLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * - *

Sample 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: @@ -4141,19 +2335,10 @@ public final GlobalSiteTag getGlobalSiteTag(GlobalSiteTagName name) { return getGlobalSiteTag(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]");
-   *   GlobalSiteTag response = analyticsAdminServiceClient.getGlobalSiteTag(name.toString());
-   * }
-   * 
- * * @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: @@ -4165,22 +2350,10 @@ public final GlobalSiteTag getGlobalSiteTag(String name) { return getGlobalSiteTag(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]");
-   *   GetGlobalSiteTagRequest request = GetGlobalSiteTagRequest.newBuilder()
-   *     .setName(name.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 */ @@ -4188,42 +2361,20 @@ public final GlobalSiteTag getGlobalSiteTag(GetGlobalSiteTagRequest request) { return getGlobalSiteTagCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the Site Tag for the specified web stream. Site Tags are immutable singletons. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]");
-   *   GetGlobalSiteTagRequest request = GetGlobalSiteTagRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<GlobalSiteTag> future = analyticsAdminServiceClient.getGlobalSiteTagCallable().futureCall(request);
-   *   // Do something
-   *   GlobalSiteTag response = future.get();
-   * }
-   * 
*/ public final UnaryCallable getGlobalSiteTagCallable() { return stub.getGlobalSiteTagCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a GoogleAdsLink. * - *

Sample 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 @@ -4237,20 +2388,10 @@ public final GoogleAdsLink createGoogleAdsLink(PropertyName parent, GoogleAdsLin return createGoogleAdsLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a GoogleAdsLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
-   *   GoogleAdsLink response = analyticsAdminServiceClient.createGoogleAdsLink(parent.toString(), 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 @@ -4264,24 +2405,10 @@ public final GoogleAdsLink createGoogleAdsLink(String parent, GoogleAdsLink goog return createGoogleAdsLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a GoogleAdsLink. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
-   *   CreateGoogleAdsLinkRequest request = CreateGoogleAdsLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGoogleAdsLink(googleAdsLink)
-   *     .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 */ @@ -4289,45 +2416,21 @@ public final GoogleAdsLink createGoogleAdsLink(CreateGoogleAdsLinkRequest reques return createGoogleAdsLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a GoogleAdsLink. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build();
-   *   CreateGoogleAdsLinkRequest request = CreateGoogleAdsLinkRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setGoogleAdsLink(googleAdsLink)
-   *     .build();
-   *   ApiFuture<GoogleAdsLink> future = analyticsAdminServiceClient.createGoogleAdsLinkCallable().futureCall(request);
-   *   // Do something
-   *   GoogleAdsLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable createGoogleAdsLinkCallable() { return stub.createGoogleAdsLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a GoogleAdsLink on a property * - *

Sample 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 The list of fields to be updated. Omitted fields will not be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -4342,19 +2445,10 @@ public final GoogleAdsLink updateGoogleAdsLink( return updateGoogleAdsLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a GoogleAdsLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UpdateGoogleAdsLinkRequest request = UpdateGoogleAdsLinkRequest.newBuilder().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 */ @@ -4362,39 +2456,21 @@ public final GoogleAdsLink updateGoogleAdsLink(UpdateGoogleAdsLinkRequest reques return updateGoogleAdsLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a GoogleAdsLink on a property * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   UpdateGoogleAdsLinkRequest request = UpdateGoogleAdsLinkRequest.newBuilder().build();
-   *   ApiFuture<GoogleAdsLink> future = analyticsAdminServiceClient.updateGoogleAdsLinkCallable().futureCall(request);
-   *   // Do something
-   *   GoogleAdsLink response = future.get();
-   * }
-   * 
*/ public final UnaryCallable updateGoogleAdsLinkCallable() { return stub.updateGoogleAdsLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a GoogleAdsLink on a property * - *

Sample 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 */ @@ -4406,19 +2482,10 @@ public final void deleteGoogleAdsLink(GoogleAdsLinkName name) { deleteGoogleAdsLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a GoogleAdsLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
-   *   analyticsAdminServiceClient.deleteGoogleAdsLink(name.toString());
-   * }
-   * 
- * * @param name Required. Example format: properties/1234/googleAdsLinks/5678 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -4428,22 +2495,10 @@ public final void deleteGoogleAdsLink(String name) { deleteGoogleAdsLink(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a GoogleAdsLink on a property * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
-   *   DeleteGoogleAdsLinkRequest request = DeleteGoogleAdsLinkRequest.newBuilder()
-   *     .setName(name.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 */ @@ -4451,43 +2506,20 @@ public final void deleteGoogleAdsLink(DeleteGoogleAdsLinkRequest request) { deleteGoogleAdsLinkCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Deletes a GoogleAdsLink on a property * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]");
-   *   DeleteGoogleAdsLinkRequest request = DeleteGoogleAdsLinkRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = analyticsAdminServiceClient.deleteGoogleAdsLinkCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
*/ public final UnaryCallable deleteGoogleAdsLinkCallable() { return stub.deleteGoogleAdsLinkCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoogleAdsLinks on a property. * - *

Sample 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 */ @@ -4499,21 +2531,10 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(PropertyName par return listGoogleAdsLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoogleAdsLinks on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   for (GoogleAdsLink element : analyticsAdminServiceClient.listGoogleAdsLinks(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * * @param parent Required. Example format: properties/1234 * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -4523,24 +2544,10 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks(String parent) { return listGoogleAdsLinks(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoogleAdsLinks on a property. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListGoogleAdsLinksRequest request = ListGoogleAdsLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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 */ @@ -4549,76 +2556,32 @@ public final ListGoogleAdsLinksPagedResponse listGoogleAdsLinks( return listGoogleAdsLinksPagedCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoogleAdsLinks on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListGoogleAdsLinksRequest request = ListGoogleAdsLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListGoogleAdsLinksPagedResponse> future = analyticsAdminServiceClient.listGoogleAdsLinksPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (GoogleAdsLink element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listGoogleAdsLinksPagedCallable() { return stub.listGoogleAdsLinksPagedCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoogleAdsLinks on a property. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   PropertyName parent = PropertyName.of("[PROPERTY]");
-   *   ListGoogleAdsLinksRequest request = ListGoogleAdsLinksRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListGoogleAdsLinksResponse response = analyticsAdminServiceClient.listGoogleAdsLinksCallable().call(request);
-   *     for (GoogleAdsLink element : response.getGoogleAdsLinksList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
*/ public final UnaryCallable listGoogleAdsLinksCallable() { return stub.listGoogleAdsLinksCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get data sharing settings on an account. Data sharing settings are singletons. * - *

Sample 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 @@ -4631,19 +2594,10 @@ public final DataSharingSettings getDataSharingSettings(DataSharingSettingsName return getDataSharingSettings(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get data sharing settings on an account. Data sharing settings are singletons. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
-   *   DataSharingSettings response = analyticsAdminServiceClient.getDataSharingSettings(name.toString());
-   * }
-   * 
- * * @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 @@ -4654,22 +2608,10 @@ public final DataSharingSettings getDataSharingSettings(String name) { return getDataSharingSettings(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get data sharing settings on an account. Data sharing settings are singletons. * - *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
-   *   GetDataSharingSettingsRequest request = GetDataSharingSettingsRequest.newBuilder()
-   *     .setName(name.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 */ @@ -4677,23 +2619,11 @@ public final DataSharingSettings getDataSharingSettings(GetDataSharingSettingsRe return getDataSharingSettingsCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Get data sharing settings on an account. Data sharing settings are singletons. * *

Sample code: - * - *


-   * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
-   *   DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]");
-   *   GetDataSharingSettingsRequest request = GetDataSharingSettingsRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<DataSharingSettings> 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/AnalyticsAdminServiceSettings.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java index 3067bce1..9b0e5203 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; @@ -42,7 +43,7 @@ import java.util.List; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link AnalyticsAdminServiceClient}. * @@ -60,23 +61,25 @@ * *

For example, to set the total timeout of getAccount to 30 seconds: * - *

- * 
+ * 
{@code
  * AnalyticsAdminServiceSettings.Builder analyticsAdminServiceSettingsBuilder =
  *     AnalyticsAdminServiceSettings.newBuilder();
  * analyticsAdminServiceSettingsBuilder
  *     .getAccountSettings()
  *     .setRetrySettings(
- *         analyticsAdminServiceSettingsBuilder.getAccountSettings().getRetrySettings().toBuilder()
+ *         analyticsAdminServiceSettingsBuilder
+ *             .getAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
- * AnalyticsAdminServiceSettings analyticsAdminServiceSettings = analyticsAdminServiceSettingsBuilder.build();
- * 
- * 
+ * AnalyticsAdminServiceSettings analyticsAdminServiceSettings = + * analyticsAdminServiceSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") -@BetaApi +@Generated("by gapic-generator-java") public class AnalyticsAdminServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to getAccount. */ public UnaryCallSettings getAccountSettings() { return ((AnalyticsAdminServiceStubSettings) getStubSettings()).getAccountSettings(); @@ -426,18 +429,15 @@ protected AnalyticsAdminServiceSettings(Builder settingsBuilder) throws IOExcept /** Builder for AnalyticsAdminServiceSettings. */ public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(AnalyticsAdminServiceStubSettings.newBuilder(clientContext)); } - private static Builder createDefault() { - return new Builder(AnalyticsAdminServiceStubSettings.newBuilder()); - } - protected Builder(AnalyticsAdminServiceSettings settings) { super(settings.getStubSettings().toBuilder()); } @@ -446,11 +446,15 @@ protected Builder(AnalyticsAdminServiceStubSettings.Builder stubSettings) { super(stubSettings); } + private static Builder createDefault() { + return new Builder(AnalyticsAdminServiceStubSettings.newBuilder()); + } + public AnalyticsAdminServiceStubSettings.Builder getStubSettingsBuilder() { return ((AnalyticsAdminServiceStubSettings.Builder) getStubSettings()); } - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-analytics-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 7ad090b1..1be100a4 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 @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,26 +15,15 @@ */ /** - * A client to Google Analytics Admin API. + * The interfaces provided are listed below, along with usage samples. * - *

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

=========================== AnalyticsAdminServiceClient =========================== + *

======================= AnalyticsAdminServiceClient ======================= * *

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

Sample for AnalyticsAdminServiceClient: - * - *

- * 
- * try (AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.create()) {
- *   AccountName name = AccountName.of("[ACCOUNT]");
- *   Account response = analyticsAdminServiceClient.getAccount(name);
- * }
- * 
- * 
*/ -@Generated("by gapic-generator") +@Generated("by gapic-generator-java") package com.google.analytics.admin.v1alpha; import javax.annotation.Generated; diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java index 90cdb8c0..17d51db4 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStub.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; @@ -98,20 +99,18 @@ import com.google.analytics.admin.v1alpha.UpdateWebDataStreamRequest; import com.google.analytics.admin.v1alpha.UserLink; import com.google.analytics.admin.v1alpha.WebDataStream; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.protobuf.Empty; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * Base stub class for Google Analytics Admin API. + * Base stub class for the AnalyticsAdminService service API. * *

This class is for advanced usage and reflects the underlying API directly. */ @Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class AnalyticsAdminServiceStub implements BackgroundResource { public UnaryCallable getAccountCallable() { diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java index 213b9378..11deedd5 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/AnalyticsAdminServiceStubSettings.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; @@ -132,7 +133,7 @@ import javax.annotation.Generated; import org.threeten.bp.Duration; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** * Settings class to configure an instance of {@link AnalyticsAdminServiceStub}. * @@ -150,22 +151,24 @@ * *

For example, to set the total timeout of getAccount to 30 seconds: * - *

- * 
+ * 
{@code
  * AnalyticsAdminServiceStubSettings.Builder analyticsAdminServiceSettingsBuilder =
  *     AnalyticsAdminServiceStubSettings.newBuilder();
  * analyticsAdminServiceSettingsBuilder
  *     .getAccountSettings()
  *     .setRetrySettings(
- *         analyticsAdminServiceSettingsBuilder.getAccountSettings().getRetrySettings().toBuilder()
+ *         analyticsAdminServiceSettingsBuilder
+ *             .getAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
- * AnalyticsAdminServiceStubSettings analyticsAdminServiceSettings = analyticsAdminServiceSettingsBuilder.build();
- * 
- * 
+ * AnalyticsAdminServiceStubSettings analyticsAdminServiceSettings = + * analyticsAdminServiceSettingsBuilder.build(); + * }
*/ -@Generated("by gapic-generator") @BetaApi +@Generated("by gapic-generator-java") public class AnalyticsAdminServiceStubSettings extends StubSettings { /** The default scopes of the service. */ @@ -274,958 +277,957 @@ public class AnalyticsAdminServiceStubSettings private final UnaryCallSettings getDataSharingSettingsSettings; - /** Returns the object with the settings used for calls to getAccount. */ - public UnaryCallSettings getAccountSettings() { - return getAccountSettings; - } - - /** Returns the object with the settings used for calls to listAccounts. */ - public PagedCallSettings - listAccountsSettings() { - return listAccountsSettings; - } + private static final PagedListDescriptor + LIST_ACCOUNTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to deleteAccount. */ - public UnaryCallSettings deleteAccountSettings() { - return deleteAccountSettings; - } + @Override + public ListAccountsRequest injectToken(ListAccountsRequest payload, String token) { + return ListAccountsRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to updateAccount. */ - public UnaryCallSettings updateAccountSettings() { - return updateAccountSettings; - } + @Override + public ListAccountsRequest injectPageSize(ListAccountsRequest payload, int pageSize) { + return ListAccountsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to provisionAccountTicket. */ - public UnaryCallSettings - provisionAccountTicketSettings() { - return provisionAccountTicketSettings; - } + @Override + public Integer extractPageSize(ListAccountsRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to listAccountSummaries. */ - public PagedCallSettings< - ListAccountSummariesRequest, - ListAccountSummariesResponse, - ListAccountSummariesPagedResponse> - listAccountSummariesSettings() { - return listAccountSummariesSettings; - } + @Override + public String extractNextToken(ListAccountsResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to getProperty. */ - public UnaryCallSettings getPropertySettings() { - return getPropertySettings; - } + @Override + public Iterable extractResources(ListAccountsResponse payload) { + return payload.getAccountsList() == null + ? ImmutableList.of() + : payload.getAccountsList(); + } + }; - /** Returns the object with the settings used for calls to listProperties. */ - public PagedCallSettings< - ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> - listPropertiesSettings() { - return listPropertiesSettings; - } + private static final PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary>() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to createProperty. */ - public UnaryCallSettings createPropertySettings() { - return createPropertySettings; - } + @Override + public ListAccountSummariesRequest injectToken( + ListAccountSummariesRequest payload, String token) { + return ListAccountSummariesRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to deleteProperty. */ - public UnaryCallSettings deletePropertySettings() { - return deletePropertySettings; - } + @Override + public ListAccountSummariesRequest injectPageSize( + ListAccountSummariesRequest payload, int pageSize) { + return ListAccountSummariesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to updateProperty. */ - public UnaryCallSettings updatePropertySettings() { - return updatePropertySettings; - } + @Override + public Integer extractPageSize(ListAccountSummariesRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to getUserLink. */ - public UnaryCallSettings getUserLinkSettings() { - return getUserLinkSettings; - } + @Override + public String extractNextToken(ListAccountSummariesResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to batchGetUserLinks. */ - public UnaryCallSettings - batchGetUserLinksSettings() { - return batchGetUserLinksSettings; - } + @Override + public Iterable extractResources(ListAccountSummariesResponse payload) { + return payload.getAccountSummariesList() == null + ? ImmutableList.of() + : payload.getAccountSummariesList(); + } + }; - /** Returns the object with the settings used for calls to listUserLinks. */ - public PagedCallSettings - listUserLinksSettings() { - return listUserLinksSettings; - } + private static final PagedListDescriptor + LIST_PROPERTIES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to auditUserLinks. */ - public PagedCallSettings< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - auditUserLinksSettings() { - return auditUserLinksSettings; - } + @Override + public ListPropertiesRequest injectToken(ListPropertiesRequest payload, String token) { + return ListPropertiesRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to createUserLink. */ - public UnaryCallSettings createUserLinkSettings() { - return createUserLinkSettings; - } + @Override + public ListPropertiesRequest injectPageSize( + ListPropertiesRequest payload, int pageSize) { + return ListPropertiesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to batchCreateUserLinks. */ - public UnaryCallSettings - batchCreateUserLinksSettings() { - return batchCreateUserLinksSettings; - } + @Override + public Integer extractPageSize(ListPropertiesRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to updateUserLink. */ - public UnaryCallSettings updateUserLinkSettings() { - return updateUserLinkSettings; - } + @Override + public String extractNextToken(ListPropertiesResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to batchUpdateUserLinks. */ - public UnaryCallSettings - batchUpdateUserLinksSettings() { - return batchUpdateUserLinksSettings; - } + @Override + public Iterable extractResources(ListPropertiesResponse payload) { + return payload.getPropertiesList() == null + ? ImmutableList.of() + : payload.getPropertiesList(); + } + }; - /** Returns the object with the settings used for calls to deleteUserLink. */ - public UnaryCallSettings deleteUserLinkSettings() { - return deleteUserLinkSettings; - } + private static final PagedListDescriptor + LIST_USER_LINKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to batchDeleteUserLinks. */ - public UnaryCallSettings batchDeleteUserLinksSettings() { - return batchDeleteUserLinksSettings; - } + @Override + public ListUserLinksRequest injectToken(ListUserLinksRequest payload, String token) { + return ListUserLinksRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to getWebDataStream. */ - public UnaryCallSettings getWebDataStreamSettings() { - return getWebDataStreamSettings; - } + @Override + public ListUserLinksRequest injectPageSize(ListUserLinksRequest payload, int pageSize) { + return ListUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to deleteWebDataStream. */ - public UnaryCallSettings deleteWebDataStreamSettings() { - return deleteWebDataStreamSettings; - } + @Override + public Integer extractPageSize(ListUserLinksRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to updateWebDataStream. */ - public UnaryCallSettings - updateWebDataStreamSettings() { - return updateWebDataStreamSettings; - } + @Override + public String extractNextToken(ListUserLinksResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to createWebDataStream. */ - public UnaryCallSettings - createWebDataStreamSettings() { - return createWebDataStreamSettings; - } + @Override + public Iterable extractResources(ListUserLinksResponse payload) { + return payload.getUserLinksList() == null + ? ImmutableList.of() + : payload.getUserLinksList(); + } + }; - /** Returns the object with the settings used for calls to listWebDataStreams. */ - public PagedCallSettings< - ListWebDataStreamsRequest, ListWebDataStreamsResponse, ListWebDataStreamsPagedResponse> - listWebDataStreamsSettings() { - return listWebDataStreamsSettings; - } + private static final PagedListDescriptor< + AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLink> + AUDIT_USER_LINKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to getIosAppDataStream. */ - public UnaryCallSettings - getIosAppDataStreamSettings() { - return getIosAppDataStreamSettings; - } + @Override + public AuditUserLinksRequest injectToken(AuditUserLinksRequest payload, String token) { + return AuditUserLinksRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to deleteIosAppDataStream. */ - public UnaryCallSettings deleteIosAppDataStreamSettings() { - return deleteIosAppDataStreamSettings; - } + @Override + public AuditUserLinksRequest injectPageSize( + AuditUserLinksRequest payload, int pageSize) { + return AuditUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to updateIosAppDataStream. */ - public UnaryCallSettings - updateIosAppDataStreamSettings() { - return updateIosAppDataStreamSettings; - } + @Override + public Integer extractPageSize(AuditUserLinksRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to createIosAppDataStream. */ - public UnaryCallSettings - createIosAppDataStreamSettings() { - return createIosAppDataStreamSettings; - } + @Override + public String extractNextToken(AuditUserLinksResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to listIosAppDataStreams. */ - public PagedCallSettings< - ListIosAppDataStreamsRequest, - ListIosAppDataStreamsResponse, - ListIosAppDataStreamsPagedResponse> - listIosAppDataStreamsSettings() { - return listIosAppDataStreamsSettings; - } + @Override + public Iterable extractResources(AuditUserLinksResponse payload) { + return payload.getUserLinksList() == null + ? ImmutableList.of() + : payload.getUserLinksList(); + } + }; - /** Returns the object with the settings used for calls to getAndroidAppDataStream. */ - public UnaryCallSettings - getAndroidAppDataStreamSettings() { - return getAndroidAppDataStreamSettings; - } + private static final PagedListDescriptor< + ListWebDataStreamsRequest, ListWebDataStreamsResponse, WebDataStream> + LIST_WEB_DATA_STREAMS_PAGE_STR_DESC = + new PagedListDescriptor< + ListWebDataStreamsRequest, ListWebDataStreamsResponse, WebDataStream>() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to deleteAndroidAppDataStream. */ - public UnaryCallSettings - deleteAndroidAppDataStreamSettings() { - return deleteAndroidAppDataStreamSettings; - } + @Override + public ListWebDataStreamsRequest injectToken( + ListWebDataStreamsRequest payload, String token) { + return ListWebDataStreamsRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to updateAndroidAppDataStream. */ - public UnaryCallSettings - updateAndroidAppDataStreamSettings() { - return updateAndroidAppDataStreamSettings; - } + @Override + public ListWebDataStreamsRequest injectPageSize( + ListWebDataStreamsRequest payload, int pageSize) { + return ListWebDataStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to createAndroidAppDataStream. */ - public UnaryCallSettings - createAndroidAppDataStreamSettings() { - return createAndroidAppDataStreamSettings; - } + @Override + public Integer extractPageSize(ListWebDataStreamsRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to listAndroidAppDataStreams. */ - public PagedCallSettings< - ListAndroidAppDataStreamsRequest, - ListAndroidAppDataStreamsResponse, - ListAndroidAppDataStreamsPagedResponse> - listAndroidAppDataStreamsSettings() { - return listAndroidAppDataStreamsSettings; - } + @Override + public String extractNextToken(ListWebDataStreamsResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to getEnhancedMeasurementSettings. */ - public UnaryCallSettings - getEnhancedMeasurementSettingsSettings() { - return getEnhancedMeasurementSettingsSettings; - } + @Override + public Iterable extractResources(ListWebDataStreamsResponse payload) { + return payload.getWebDataStreamsList() == null + ? ImmutableList.of() + : payload.getWebDataStreamsList(); + } + }; - /** Returns the object with the settings used for calls to updateEnhancedMeasurementSettings. */ - public UnaryCallSettings - updateEnhancedMeasurementSettingsSettings() { - return updateEnhancedMeasurementSettingsSettings; - } + private static final PagedListDescriptor< + ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream> + LIST_IOS_APP_DATA_STREAMS_PAGE_STR_DESC = + new PagedListDescriptor< + ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream>() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to createFirebaseLink. */ - public UnaryCallSettings createFirebaseLinkSettings() { - return createFirebaseLinkSettings; - } + @Override + public ListIosAppDataStreamsRequest injectToken( + ListIosAppDataStreamsRequest payload, String token) { + return ListIosAppDataStreamsRequest.newBuilder(payload).setPageToken(token).build(); + } - /** Returns the object with the settings used for calls to updateFirebaseLink. */ - public UnaryCallSettings updateFirebaseLinkSettings() { - return updateFirebaseLinkSettings; - } + @Override + public ListIosAppDataStreamsRequest injectPageSize( + ListIosAppDataStreamsRequest payload, int pageSize) { + return ListIosAppDataStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } - /** Returns the object with the settings used for calls to deleteFirebaseLink. */ - public UnaryCallSettings deleteFirebaseLinkSettings() { - return deleteFirebaseLinkSettings; - } + @Override + public Integer extractPageSize(ListIosAppDataStreamsRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to listFirebaseLinks. */ - public UnaryCallSettings - listFirebaseLinksSettings() { - return listFirebaseLinksSettings; - } + @Override + public String extractNextToken(ListIosAppDataStreamsResponse payload) { + return payload.getNextPageToken(); + } - /** Returns the object with the settings used for calls to getGlobalSiteTag. */ - public UnaryCallSettings getGlobalSiteTagSettings() { - return getGlobalSiteTagSettings; - } + @Override + public Iterable extractResources( + ListIosAppDataStreamsResponse payload) { + return payload.getIosAppDataStreamsList() == null + ? ImmutableList.of() + : payload.getIosAppDataStreamsList(); + } + }; - /** Returns the object with the settings used for calls to createGoogleAdsLink. */ - public UnaryCallSettings - createGoogleAdsLinkSettings() { - return createGoogleAdsLinkSettings; - } + private static final PagedListDescriptor< + ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsResponse, AndroidAppDataStream> + LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAndroidAppDataStreamsRequest, + ListAndroidAppDataStreamsResponse, + AndroidAppDataStream>() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the object with the settings used for calls to updateGoogleAdsLink. */ - public UnaryCallSettings - updateGoogleAdsLinkSettings() { - return updateGoogleAdsLinkSettings; - } + @Override + public ListAndroidAppDataStreamsRequest injectToken( + ListAndroidAppDataStreamsRequest payload, String token) { + return ListAndroidAppDataStreamsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } - /** Returns the object with the settings used for calls to deleteGoogleAdsLink. */ - public UnaryCallSettings deleteGoogleAdsLinkSettings() { - return deleteGoogleAdsLinkSettings; - } + @Override + public ListAndroidAppDataStreamsRequest injectPageSize( + ListAndroidAppDataStreamsRequest payload, int pageSize) { + return ListAndroidAppDataStreamsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } - /** Returns the object with the settings used for calls to listGoogleAdsLinks. */ - public PagedCallSettings< - ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> - listGoogleAdsLinksSettings() { - return listGoogleAdsLinksSettings; - } + @Override + public Integer extractPageSize(ListAndroidAppDataStreamsRequest payload) { + return payload.getPageSize(); + } - /** Returns the object with the settings used for calls to getDataSharingSettings. */ - public UnaryCallSettings - getDataSharingSettingsSettings() { - return getDataSharingSettingsSettings; - } + @Override + public String extractNextToken(ListAndroidAppDataStreamsResponse payload) { + return payload.getNextPageToken(); + } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AnalyticsAdminServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAnalyticsAdminServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); - } - } + @Override + public Iterable extractResources( + ListAndroidAppDataStreamsResponse payload) { + return payload.getAndroidAppDataStreamsList() == null + ? ImmutableList.of() + : payload.getAndroidAppDataStreamsList(); + } + }; - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } + private static final PagedListDescriptor< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink> + LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink>() { + @Override + public String emptyToken() { + return ""; + } - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "analyticsadmin.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(AnalyticsAdminServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getAccountSettings = settingsBuilder.getAccountSettings().build(); - listAccountsSettings = settingsBuilder.listAccountsSettings().build(); - deleteAccountSettings = settingsBuilder.deleteAccountSettings().build(); - updateAccountSettings = settingsBuilder.updateAccountSettings().build(); - provisionAccountTicketSettings = settingsBuilder.provisionAccountTicketSettings().build(); - listAccountSummariesSettings = settingsBuilder.listAccountSummariesSettings().build(); - getPropertySettings = settingsBuilder.getPropertySettings().build(); - listPropertiesSettings = settingsBuilder.listPropertiesSettings().build(); - createPropertySettings = settingsBuilder.createPropertySettings().build(); - deletePropertySettings = settingsBuilder.deletePropertySettings().build(); - updatePropertySettings = settingsBuilder.updatePropertySettings().build(); - getUserLinkSettings = settingsBuilder.getUserLinkSettings().build(); - batchGetUserLinksSettings = settingsBuilder.batchGetUserLinksSettings().build(); - listUserLinksSettings = settingsBuilder.listUserLinksSettings().build(); - auditUserLinksSettings = settingsBuilder.auditUserLinksSettings().build(); - createUserLinkSettings = settingsBuilder.createUserLinkSettings().build(); - batchCreateUserLinksSettings = settingsBuilder.batchCreateUserLinksSettings().build(); - updateUserLinkSettings = settingsBuilder.updateUserLinkSettings().build(); - batchUpdateUserLinksSettings = settingsBuilder.batchUpdateUserLinksSettings().build(); - deleteUserLinkSettings = settingsBuilder.deleteUserLinkSettings().build(); - batchDeleteUserLinksSettings = settingsBuilder.batchDeleteUserLinksSettings().build(); - getWebDataStreamSettings = settingsBuilder.getWebDataStreamSettings().build(); - deleteWebDataStreamSettings = settingsBuilder.deleteWebDataStreamSettings().build(); - updateWebDataStreamSettings = settingsBuilder.updateWebDataStreamSettings().build(); - createWebDataStreamSettings = settingsBuilder.createWebDataStreamSettings().build(); - listWebDataStreamsSettings = settingsBuilder.listWebDataStreamsSettings().build(); - getIosAppDataStreamSettings = settingsBuilder.getIosAppDataStreamSettings().build(); - deleteIosAppDataStreamSettings = settingsBuilder.deleteIosAppDataStreamSettings().build(); - updateIosAppDataStreamSettings = settingsBuilder.updateIosAppDataStreamSettings().build(); - createIosAppDataStreamSettings = settingsBuilder.createIosAppDataStreamSettings().build(); - listIosAppDataStreamsSettings = settingsBuilder.listIosAppDataStreamsSettings().build(); - getAndroidAppDataStreamSettings = settingsBuilder.getAndroidAppDataStreamSettings().build(); - deleteAndroidAppDataStreamSettings = - settingsBuilder.deleteAndroidAppDataStreamSettings().build(); - updateAndroidAppDataStreamSettings = - settingsBuilder.updateAndroidAppDataStreamSettings().build(); - createAndroidAppDataStreamSettings = - settingsBuilder.createAndroidAppDataStreamSettings().build(); - listAndroidAppDataStreamsSettings = settingsBuilder.listAndroidAppDataStreamsSettings().build(); - getEnhancedMeasurementSettingsSettings = - settingsBuilder.getEnhancedMeasurementSettingsSettings().build(); - updateEnhancedMeasurementSettingsSettings = - settingsBuilder.updateEnhancedMeasurementSettingsSettings().build(); - createFirebaseLinkSettings = settingsBuilder.createFirebaseLinkSettings().build(); - updateFirebaseLinkSettings = settingsBuilder.updateFirebaseLinkSettings().build(); - deleteFirebaseLinkSettings = settingsBuilder.deleteFirebaseLinkSettings().build(); - listFirebaseLinksSettings = settingsBuilder.listFirebaseLinksSettings().build(); - getGlobalSiteTagSettings = settingsBuilder.getGlobalSiteTagSettings().build(); - createGoogleAdsLinkSettings = settingsBuilder.createGoogleAdsLinkSettings().build(); - updateGoogleAdsLinkSettings = settingsBuilder.updateGoogleAdsLinkSettings().build(); - deleteGoogleAdsLinkSettings = settingsBuilder.deleteGoogleAdsLinkSettings().build(); - listGoogleAdsLinksSettings = settingsBuilder.listGoogleAdsLinksSettings().build(); - getDataSharingSettingsSettings = settingsBuilder.getDataSharingSettingsSettings().build(); - } - - private static final PagedListDescriptor - LIST_ACCOUNTS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAccountsRequest injectToken(ListAccountsRequest payload, String token) { - return ListAccountsRequest.newBuilder(payload).setPageToken(token).build(); - } + @Override + public ListGoogleAdsLinksRequest injectToken( + ListGoogleAdsLinksRequest payload, String token) { + return ListGoogleAdsLinksRequest.newBuilder(payload).setPageToken(token).build(); + } @Override - public ListAccountsRequest injectPageSize(ListAccountsRequest payload, int pageSize) { - return ListAccountsRequest.newBuilder(payload).setPageSize(pageSize).build(); + public ListGoogleAdsLinksRequest injectPageSize( + ListGoogleAdsLinksRequest payload, int pageSize) { + return ListGoogleAdsLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); } @Override - public Integer extractPageSize(ListAccountsRequest payload) { + public Integer extractPageSize(ListGoogleAdsLinksRequest payload) { return payload.getPageSize(); } @Override - public String extractNextToken(ListAccountsResponse payload) { + public String extractNextToken(ListGoogleAdsLinksResponse payload) { return payload.getNextPageToken(); } @Override - public Iterable extractResources(ListAccountsResponse payload) { - return payload.getAccountsList() != null - ? payload.getAccountsList() - : ImmutableList.of(); + public Iterable extractResources(ListGoogleAdsLinksResponse payload) { + return payload.getGoogleAdsLinksList() == null + ? ImmutableList.of() + : payload.getGoogleAdsLinksList(); } }; - private static final PagedListDescriptor< - ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary> - LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC = - new PagedListDescriptor< - ListAccountSummariesRequest, ListAccountSummariesResponse, AccountSummary>() { - @Override - public String emptyToken() { - return ""; - } - + private static final PagedListResponseFactory< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> + LIST_ACCOUNTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse>() { @Override - public ListAccountSummariesRequest injectToken( - ListAccountSummariesRequest payload, String token) { - return ListAccountSummariesRequest.newBuilder(payload).setPageToken(token).build(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ACCOUNTS_PAGE_STR_DESC, request, context); + return ListAccountsPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse>() { @Override - public ListAccountSummariesRequest injectPageSize( - ListAccountSummariesRequest payload, int pageSize) { - return ListAccountSummariesRequest.newBuilder(payload).setPageSize(pageSize).build(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAccountSummariesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC, request, context); + return ListAccountSummariesPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + LIST_PROPERTIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse>() { @Override - public Integer extractPageSize(ListAccountSummariesRequest payload) { - return payload.getPageSize(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPropertiesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PROPERTIES_PAGE_STR_DESC, request, context); + return ListPropertiesPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> + LIST_USER_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse>() { @Override - public String extractNextToken(ListAccountSummariesResponse payload) { - return payload.getNextPageToken(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUserLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_USER_LINKS_PAGE_STR_DESC, request, context); + return ListUserLinksPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> + AUDIT_USER_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse>() { @Override - public Iterable extractResources(ListAccountSummariesResponse payload) { - return payload.getAccountSummariesList() != null - ? payload.getAccountSummariesList() - : ImmutableList.of(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + AuditUserLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, AUDIT_USER_LINKS_PAGE_STR_DESC, request, context); + return AuditUserLinksPagedResponse.createAsync(pageContext, futureResponse); } }; - private static final PagedListDescriptor - LIST_PROPERTIES_PAGE_STR_DESC = - new PagedListDescriptor() { + private static final PagedListResponseFactory< + ListWebDataStreamsRequest, ListWebDataStreamsResponse, ListWebDataStreamsPagedResponse> + LIST_WEB_DATA_STREAMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListWebDataStreamsRequest, + ListWebDataStreamsResponse, + ListWebDataStreamsPagedResponse>() { @Override - public String emptyToken() { - return ""; + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListWebDataStreamsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_WEB_DATA_STREAMS_PAGE_STR_DESC, request, context); + return ListWebDataStreamsPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListIosAppDataStreamsRequest, + ListIosAppDataStreamsResponse, + ListIosAppDataStreamsPagedResponse> + LIST_IOS_APP_DATA_STREAMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIosAppDataStreamsRequest, + ListIosAppDataStreamsResponse, + ListIosAppDataStreamsPagedResponse>() { @Override - public ListPropertiesRequest injectToken(ListPropertiesRequest payload, String token) { - return ListPropertiesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListPropertiesRequest injectPageSize( - ListPropertiesRequest payload, int pageSize) { - return ListPropertiesRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListPropertiesRequest payload) { - return payload.getPageSize(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIosAppDataStreamsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream> + pageContext = + PageContext.create( + callable, LIST_IOS_APP_DATA_STREAMS_PAGE_STR_DESC, request, context); + return ListIosAppDataStreamsPagedResponse.createAsync(pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListAndroidAppDataStreamsRequest, + ListAndroidAppDataStreamsResponse, + ListAndroidAppDataStreamsPagedResponse> + LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAndroidAppDataStreamsRequest, + ListAndroidAppDataStreamsResponse, + ListAndroidAppDataStreamsPagedResponse>() { @Override - public String extractNextToken(ListPropertiesResponse payload) { - return payload.getNextPageToken(); + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAndroidAppDataStreamsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAndroidAppDataStreamsRequest, + ListAndroidAppDataStreamsResponse, + AndroidAppDataStream> + pageContext = + PageContext.create( + callable, LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_DESC, request, context); + return ListAndroidAppDataStreamsPagedResponse.createAsync( + pageContext, futureResponse); } + }; + private static final PagedListResponseFactory< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + LIST_GOOGLE_ADS_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListGoogleAdsLinksRequest, + ListGoogleAdsLinksResponse, + ListGoogleAdsLinksPagedResponse>() { @Override - public Iterable extractResources(ListPropertiesResponse payload) { - return payload.getPropertiesList() != null - ? payload.getPropertiesList() - : ImmutableList.of(); + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListGoogleAdsLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC, request, context); + return ListGoogleAdsLinksPagedResponse.createAsync(pageContext, futureResponse); } }; - private static final PagedListDescriptor - LIST_USER_LINKS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to getAccount. */ + public UnaryCallSettings getAccountSettings() { + return getAccountSettings; + } - @Override - public ListUserLinksRequest injectToken(ListUserLinksRequest payload, String token) { - return ListUserLinksRequest.newBuilder(payload).setPageToken(token).build(); - } + /** Returns the object with the settings used for calls to listAccounts. */ + public PagedCallSettings + listAccountsSettings() { + return listAccountsSettings; + } - @Override - public ListUserLinksRequest injectPageSize(ListUserLinksRequest payload, int pageSize) { - return ListUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); - } + /** Returns the object with the settings used for calls to deleteAccount. */ + public UnaryCallSettings deleteAccountSettings() { + return deleteAccountSettings; + } - @Override - public Integer extractPageSize(ListUserLinksRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to updateAccount. */ + public UnaryCallSettings updateAccountSettings() { + return updateAccountSettings; + } - @Override - public String extractNextToken(ListUserLinksResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to provisionAccountTicket. */ + public UnaryCallSettings + provisionAccountTicketSettings() { + return provisionAccountTicketSettings; + } - @Override - public Iterable extractResources(ListUserLinksResponse payload) { - return payload.getUserLinksList() != null - ? payload.getUserLinksList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to listAccountSummaries. */ + public PagedCallSettings< + ListAccountSummariesRequest, + ListAccountSummariesResponse, + ListAccountSummariesPagedResponse> + listAccountSummariesSettings() { + return listAccountSummariesSettings; + } - private static final PagedListDescriptor< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLink> - AUDIT_USER_LINKS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to getProperty. */ + public UnaryCallSettings getPropertySettings() { + return getPropertySettings; + } - @Override - public AuditUserLinksRequest injectToken(AuditUserLinksRequest payload, String token) { - return AuditUserLinksRequest.newBuilder(payload).setPageToken(token).build(); - } + /** Returns the object with the settings used for calls to listProperties. */ + public PagedCallSettings< + ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> + listPropertiesSettings() { + return listPropertiesSettings; + } - @Override - public AuditUserLinksRequest injectPageSize( - AuditUserLinksRequest payload, int pageSize) { - return AuditUserLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); - } + /** Returns the object with the settings used for calls to createProperty. */ + public UnaryCallSettings createPropertySettings() { + return createPropertySettings; + } - @Override - public Integer extractPageSize(AuditUserLinksRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to deleteProperty. */ + public UnaryCallSettings deletePropertySettings() { + return deletePropertySettings; + } - @Override - public String extractNextToken(AuditUserLinksResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to updateProperty. */ + public UnaryCallSettings updatePropertySettings() { + return updatePropertySettings; + } - @Override - public Iterable extractResources(AuditUserLinksResponse payload) { - return payload.getUserLinksList() != null - ? payload.getUserLinksList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to getUserLink. */ + public UnaryCallSettings getUserLinkSettings() { + return getUserLinkSettings; + } - private static final PagedListDescriptor< - ListWebDataStreamsRequest, ListWebDataStreamsResponse, WebDataStream> - LIST_WEB_DATA_STREAMS_PAGE_STR_DESC = - new PagedListDescriptor< - ListWebDataStreamsRequest, ListWebDataStreamsResponse, WebDataStream>() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to batchGetUserLinks. */ + public UnaryCallSettings + batchGetUserLinksSettings() { + return batchGetUserLinksSettings; + } - @Override - public ListWebDataStreamsRequest injectToken( - ListWebDataStreamsRequest payload, String token) { - return ListWebDataStreamsRequest.newBuilder(payload).setPageToken(token).build(); - } + /** Returns the object with the settings used for calls to listUserLinks. */ + public PagedCallSettings + listUserLinksSettings() { + return listUserLinksSettings; + } - @Override - public ListWebDataStreamsRequest injectPageSize( - ListWebDataStreamsRequest payload, int pageSize) { - return ListWebDataStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } + /** Returns the object with the settings used for calls to auditUserLinks. */ + public PagedCallSettings< + AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> + auditUserLinksSettings() { + return auditUserLinksSettings; + } - @Override - public Integer extractPageSize(ListWebDataStreamsRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to createUserLink. */ + public UnaryCallSettings createUserLinkSettings() { + return createUserLinkSettings; + } - @Override - public String extractNextToken(ListWebDataStreamsResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to batchCreateUserLinks. */ + public UnaryCallSettings + batchCreateUserLinksSettings() { + return batchCreateUserLinksSettings; + } - @Override - public Iterable extractResources(ListWebDataStreamsResponse payload) { - return payload.getWebDataStreamsList() != null - ? payload.getWebDataStreamsList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to updateUserLink. */ + public UnaryCallSettings updateUserLinkSettings() { + return updateUserLinkSettings; + } - private static final PagedListDescriptor< - ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream> - LIST_IOS_APP_DATA_STREAMS_PAGE_STR_DESC = - new PagedListDescriptor< - ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream>() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to batchUpdateUserLinks. */ + public UnaryCallSettings + batchUpdateUserLinksSettings() { + return batchUpdateUserLinksSettings; + } - @Override - public ListIosAppDataStreamsRequest injectToken( - ListIosAppDataStreamsRequest payload, String token) { - return ListIosAppDataStreamsRequest.newBuilder(payload).setPageToken(token).build(); - } + /** Returns the object with the settings used for calls to deleteUserLink. */ + public UnaryCallSettings deleteUserLinkSettings() { + return deleteUserLinkSettings; + } - @Override - public ListIosAppDataStreamsRequest injectPageSize( - ListIosAppDataStreamsRequest payload, int pageSize) { - return ListIosAppDataStreamsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } + /** Returns the object with the settings used for calls to batchDeleteUserLinks. */ + public UnaryCallSettings batchDeleteUserLinksSettings() { + return batchDeleteUserLinksSettings; + } - @Override - public Integer extractPageSize(ListIosAppDataStreamsRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to getWebDataStream. */ + public UnaryCallSettings getWebDataStreamSettings() { + return getWebDataStreamSettings; + } - @Override - public String extractNextToken(ListIosAppDataStreamsResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to deleteWebDataStream. */ + public UnaryCallSettings deleteWebDataStreamSettings() { + return deleteWebDataStreamSettings; + } - @Override - public Iterable extractResources( - ListIosAppDataStreamsResponse payload) { - return payload.getIosAppDataStreamsList() != null - ? payload.getIosAppDataStreamsList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to updateWebDataStream. */ + public UnaryCallSettings + updateWebDataStreamSettings() { + return updateWebDataStreamSettings; + } - private static final PagedListDescriptor< - ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsResponse, AndroidAppDataStream> - LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_DESC = - new PagedListDescriptor< - ListAndroidAppDataStreamsRequest, - ListAndroidAppDataStreamsResponse, - AndroidAppDataStream>() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to createWebDataStream. */ + public UnaryCallSettings + createWebDataStreamSettings() { + return createWebDataStreamSettings; + } - @Override - public ListAndroidAppDataStreamsRequest injectToken( - ListAndroidAppDataStreamsRequest payload, String token) { - return ListAndroidAppDataStreamsRequest.newBuilder(payload) - .setPageToken(token) - .build(); - } + /** Returns the object with the settings used for calls to listWebDataStreams. */ + public PagedCallSettings< + ListWebDataStreamsRequest, ListWebDataStreamsResponse, ListWebDataStreamsPagedResponse> + listWebDataStreamsSettings() { + return listWebDataStreamsSettings; + } - @Override - public ListAndroidAppDataStreamsRequest injectPageSize( - ListAndroidAppDataStreamsRequest payload, int pageSize) { - return ListAndroidAppDataStreamsRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } + /** Returns the object with the settings used for calls to getIosAppDataStream. */ + public UnaryCallSettings + getIosAppDataStreamSettings() { + return getIosAppDataStreamSettings; + } - @Override - public Integer extractPageSize(ListAndroidAppDataStreamsRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to deleteIosAppDataStream. */ + public UnaryCallSettings deleteIosAppDataStreamSettings() { + return deleteIosAppDataStreamSettings; + } - @Override - public String extractNextToken(ListAndroidAppDataStreamsResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to updateIosAppDataStream. */ + public UnaryCallSettings + updateIosAppDataStreamSettings() { + return updateIosAppDataStreamSettings; + } - @Override - public Iterable extractResources( - ListAndroidAppDataStreamsResponse payload) { - return payload.getAndroidAppDataStreamsList() != null - ? payload.getAndroidAppDataStreamsList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to createIosAppDataStream. */ + public UnaryCallSettings + createIosAppDataStreamSettings() { + return createIosAppDataStreamSettings; + } - private static final PagedListDescriptor< - ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink> - LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC = - new PagedListDescriptor< - ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, GoogleAdsLink>() { - @Override - public String emptyToken() { - return ""; - } + /** Returns the object with the settings used for calls to listIosAppDataStreams. */ + public PagedCallSettings< + ListIosAppDataStreamsRequest, + ListIosAppDataStreamsResponse, + ListIosAppDataStreamsPagedResponse> + listIosAppDataStreamsSettings() { + return listIosAppDataStreamsSettings; + } - @Override - public ListGoogleAdsLinksRequest injectToken( - ListGoogleAdsLinksRequest payload, String token) { - return ListGoogleAdsLinksRequest.newBuilder(payload).setPageToken(token).build(); - } + /** Returns the object with the settings used for calls to getAndroidAppDataStream. */ + public UnaryCallSettings + getAndroidAppDataStreamSettings() { + return getAndroidAppDataStreamSettings; + } - @Override - public ListGoogleAdsLinksRequest injectPageSize( - ListGoogleAdsLinksRequest payload, int pageSize) { - return ListGoogleAdsLinksRequest.newBuilder(payload).setPageSize(pageSize).build(); - } + /** Returns the object with the settings used for calls to deleteAndroidAppDataStream. */ + public UnaryCallSettings + deleteAndroidAppDataStreamSettings() { + return deleteAndroidAppDataStreamSettings; + } - @Override - public Integer extractPageSize(ListGoogleAdsLinksRequest payload) { - return payload.getPageSize(); - } + /** Returns the object with the settings used for calls to updateAndroidAppDataStream. */ + public UnaryCallSettings + updateAndroidAppDataStreamSettings() { + return updateAndroidAppDataStreamSettings; + } - @Override - public String extractNextToken(ListGoogleAdsLinksResponse payload) { - return payload.getNextPageToken(); - } + /** Returns the object with the settings used for calls to createAndroidAppDataStream. */ + public UnaryCallSettings + createAndroidAppDataStreamSettings() { + return createAndroidAppDataStreamSettings; + } - @Override - public Iterable extractResources(ListGoogleAdsLinksResponse payload) { - return payload.getGoogleAdsLinksList() != null - ? payload.getGoogleAdsLinksList() - : ImmutableList.of(); - } - }; + /** Returns the object with the settings used for calls to listAndroidAppDataStreams. */ + public PagedCallSettings< + ListAndroidAppDataStreamsRequest, + ListAndroidAppDataStreamsResponse, + ListAndroidAppDataStreamsPagedResponse> + listAndroidAppDataStreamsSettings() { + return listAndroidAppDataStreamsSettings; + } - private static final PagedListResponseFactory< - ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> - LIST_ACCOUNTS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAccountsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ACCOUNTS_PAGE_STR_DESC, request, context); - return ListAccountsPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns the object with the settings used for calls to getEnhancedMeasurementSettings. */ + public UnaryCallSettings + getEnhancedMeasurementSettingsSettings() { + return getEnhancedMeasurementSettingsSettings; + } - private static final PagedListResponseFactory< - ListAccountSummariesRequest, - ListAccountSummariesResponse, - ListAccountSummariesPagedResponse> - LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAccountSummariesRequest, - ListAccountSummariesResponse, - ListAccountSummariesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAccountSummariesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_ACCOUNT_SUMMARIES_PAGE_STR_DESC, request, context); - return ListAccountSummariesPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns the object with the settings used for calls to updateEnhancedMeasurementSettings. */ + public UnaryCallSettings + updateEnhancedMeasurementSettingsSettings() { + return updateEnhancedMeasurementSettingsSettings; + } + + /** Returns the object with the settings used for calls to createFirebaseLink. */ + public UnaryCallSettings createFirebaseLinkSettings() { + return createFirebaseLinkSettings; + } + + /** Returns the object with the settings used for calls to updateFirebaseLink. */ + public UnaryCallSettings updateFirebaseLinkSettings() { + return updateFirebaseLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteFirebaseLink. */ + public UnaryCallSettings deleteFirebaseLinkSettings() { + return deleteFirebaseLinkSettings; + } + + /** Returns the object with the settings used for calls to listFirebaseLinks. */ + public UnaryCallSettings + listFirebaseLinksSettings() { + return listFirebaseLinksSettings; + } + + /** Returns the object with the settings used for calls to getGlobalSiteTag. */ + public UnaryCallSettings getGlobalSiteTagSettings() { + return getGlobalSiteTagSettings; + } + + /** Returns the object with the settings used for calls to createGoogleAdsLink. */ + public UnaryCallSettings + createGoogleAdsLinkSettings() { + return createGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to updateGoogleAdsLink. */ + public UnaryCallSettings + updateGoogleAdsLinkSettings() { + return updateGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to deleteGoogleAdsLink. */ + public UnaryCallSettings deleteGoogleAdsLinkSettings() { + return deleteGoogleAdsLinkSettings; + } + + /** Returns the object with the settings used for calls to listGoogleAdsLinks. */ + public PagedCallSettings< + ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> + listGoogleAdsLinksSettings() { + return listGoogleAdsLinksSettings; + } + + /** Returns the object with the settings used for calls to getDataSharingSettings. */ + public UnaryCallSettings + getDataSharingSettingsSettings() { + return getDataSharingSettingsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AnalyticsAdminServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAnalyticsAdminServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "analyticsadmin.googleapis.com:443"; + } - private static final PagedListResponseFactory< - ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse> - LIST_PROPERTIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListPropertiesRequest, ListPropertiesResponse, ListPropertiesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListPropertiesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_PROPERTIES_PAGE_STR_DESC, request, context); - return ListPropertiesPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } - private static final PagedListResponseFactory< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse> - LIST_USER_LINKS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListUserLinksRequest, ListUserLinksResponse, ListUserLinksPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListUserLinksRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_USER_LINKS_PAGE_STR_DESC, request, context); - return ListUserLinksPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } - private static final PagedListResponseFactory< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse> - AUDIT_USER_LINKS_PAGE_STR_FACT = - new PagedListResponseFactory< - AuditUserLinksRequest, AuditUserLinksResponse, AuditUserLinksPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - AuditUserLinksRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, AUDIT_USER_LINKS_PAGE_STR_DESC, request, context); - return AuditUserLinksPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } - private static final PagedListResponseFactory< - ListWebDataStreamsRequest, ListWebDataStreamsResponse, ListWebDataStreamsPagedResponse> - LIST_WEB_DATA_STREAMS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListWebDataStreamsRequest, - ListWebDataStreamsResponse, - ListWebDataStreamsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListWebDataStreamsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_WEB_DATA_STREAMS_PAGE_STR_DESC, request, context); - return ListWebDataStreamsPagedResponse.createAsync(pageContext, futureResponse); - } - }; + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } - private static final PagedListResponseFactory< - ListIosAppDataStreamsRequest, - ListIosAppDataStreamsResponse, - ListIosAppDataStreamsPagedResponse> - LIST_IOS_APP_DATA_STREAMS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListIosAppDataStreamsRequest, - ListIosAppDataStreamsResponse, - ListIosAppDataStreamsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListIosAppDataStreamsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListIosAppDataStreamsRequest, ListIosAppDataStreamsResponse, IosAppDataStream> - pageContext = - PageContext.create( - callable, LIST_IOS_APP_DATA_STREAMS_PAGE_STR_DESC, request, context); - return ListIosAppDataStreamsPagedResponse.createAsync(pageContext, futureResponse); - } - }; + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AnalyticsAdminServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } - private static final PagedListResponseFactory< - ListAndroidAppDataStreamsRequest, - ListAndroidAppDataStreamsResponse, - ListAndroidAppDataStreamsPagedResponse> - LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAndroidAppDataStreamsRequest, - ListAndroidAppDataStreamsResponse, - ListAndroidAppDataStreamsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListAndroidAppDataStreamsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListAndroidAppDataStreamsRequest, - ListAndroidAppDataStreamsResponse, - AndroidAppDataStream> - pageContext = - PageContext.create( - callable, LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_DESC, request, context); - return ListAndroidAppDataStreamsPagedResponse.createAsync( - pageContext, futureResponse); - } - }; + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } - private static final PagedListResponseFactory< - ListGoogleAdsLinksRequest, ListGoogleAdsLinksResponse, ListGoogleAdsLinksPagedResponse> - LIST_GOOGLE_ADS_LINKS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListGoogleAdsLinksRequest, - ListGoogleAdsLinksResponse, - ListGoogleAdsLinksPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListGoogleAdsLinksRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_GOOGLE_ADS_LINKS_PAGE_STR_DESC, request, context); - return ListGoogleAdsLinksPagedResponse.createAsync(pageContext, futureResponse); - } - }; + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AnalyticsAdminServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getAccountSettings = settingsBuilder.getAccountSettings().build(); + listAccountsSettings = settingsBuilder.listAccountsSettings().build(); + deleteAccountSettings = settingsBuilder.deleteAccountSettings().build(); + updateAccountSettings = settingsBuilder.updateAccountSettings().build(); + provisionAccountTicketSettings = settingsBuilder.provisionAccountTicketSettings().build(); + listAccountSummariesSettings = settingsBuilder.listAccountSummariesSettings().build(); + getPropertySettings = settingsBuilder.getPropertySettings().build(); + listPropertiesSettings = settingsBuilder.listPropertiesSettings().build(); + createPropertySettings = settingsBuilder.createPropertySettings().build(); + deletePropertySettings = settingsBuilder.deletePropertySettings().build(); + updatePropertySettings = settingsBuilder.updatePropertySettings().build(); + getUserLinkSettings = settingsBuilder.getUserLinkSettings().build(); + batchGetUserLinksSettings = settingsBuilder.batchGetUserLinksSettings().build(); + listUserLinksSettings = settingsBuilder.listUserLinksSettings().build(); + auditUserLinksSettings = settingsBuilder.auditUserLinksSettings().build(); + createUserLinkSettings = settingsBuilder.createUserLinkSettings().build(); + batchCreateUserLinksSettings = settingsBuilder.batchCreateUserLinksSettings().build(); + updateUserLinkSettings = settingsBuilder.updateUserLinkSettings().build(); + batchUpdateUserLinksSettings = settingsBuilder.batchUpdateUserLinksSettings().build(); + deleteUserLinkSettings = settingsBuilder.deleteUserLinkSettings().build(); + batchDeleteUserLinksSettings = settingsBuilder.batchDeleteUserLinksSettings().build(); + getWebDataStreamSettings = settingsBuilder.getWebDataStreamSettings().build(); + deleteWebDataStreamSettings = settingsBuilder.deleteWebDataStreamSettings().build(); + updateWebDataStreamSettings = settingsBuilder.updateWebDataStreamSettings().build(); + createWebDataStreamSettings = settingsBuilder.createWebDataStreamSettings().build(); + listWebDataStreamsSettings = settingsBuilder.listWebDataStreamsSettings().build(); + getIosAppDataStreamSettings = settingsBuilder.getIosAppDataStreamSettings().build(); + deleteIosAppDataStreamSettings = settingsBuilder.deleteIosAppDataStreamSettings().build(); + updateIosAppDataStreamSettings = settingsBuilder.updateIosAppDataStreamSettings().build(); + createIosAppDataStreamSettings = settingsBuilder.createIosAppDataStreamSettings().build(); + listIosAppDataStreamsSettings = settingsBuilder.listIosAppDataStreamsSettings().build(); + getAndroidAppDataStreamSettings = settingsBuilder.getAndroidAppDataStreamSettings().build(); + deleteAndroidAppDataStreamSettings = + settingsBuilder.deleteAndroidAppDataStreamSettings().build(); + updateAndroidAppDataStreamSettings = + settingsBuilder.updateAndroidAppDataStreamSettings().build(); + createAndroidAppDataStreamSettings = + settingsBuilder.createAndroidAppDataStreamSettings().build(); + listAndroidAppDataStreamsSettings = settingsBuilder.listAndroidAppDataStreamsSettings().build(); + getEnhancedMeasurementSettingsSettings = + settingsBuilder.getEnhancedMeasurementSettingsSettings().build(); + updateEnhancedMeasurementSettingsSettings = + settingsBuilder.updateEnhancedMeasurementSettingsSettings().build(); + createFirebaseLinkSettings = settingsBuilder.createFirebaseLinkSettings().build(); + updateFirebaseLinkSettings = settingsBuilder.updateFirebaseLinkSettings().build(); + deleteFirebaseLinkSettings = settingsBuilder.deleteFirebaseLinkSettings().build(); + listFirebaseLinksSettings = settingsBuilder.listFirebaseLinksSettings().build(); + getGlobalSiteTagSettings = settingsBuilder.getGlobalSiteTagSettings().build(); + createGoogleAdsLinkSettings = settingsBuilder.createGoogleAdsLinkSettings().build(); + updateGoogleAdsLinkSettings = settingsBuilder.updateGoogleAdsLinkSettings().build(); + deleteGoogleAdsLinkSettings = settingsBuilder.deleteGoogleAdsLinkSettings().build(); + listGoogleAdsLinksSettings = settingsBuilder.listGoogleAdsLinksSettings().build(); + getDataSharingSettingsSettings = settingsBuilder.getDataSharingSettingsSettings().build(); + } /** Builder for AnalyticsAdminServiceStubSettings. */ public static class Builder extends StubSettings.Builder { private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder getAccountSettings; private final PagedCallSettings.Builder< ListAccountsRequest, ListAccountsResponse, ListAccountsPagedResponse> @@ -1331,7 +1333,6 @@ public static class Builder listGoogleAdsLinksSettings; private final UnaryCallSettings.Builder getDataSharingSettingsSettings; - private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -1339,13 +1340,12 @@ public static class Builder ImmutableMap.Builder> definitions = ImmutableMap.builder(); definitions.put( - "retry_policy_1_codes", + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_0_codes", ImmutableSet.copyOf( Lists.newArrayList( StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNKNOWN))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -1356,134 +1356,85 @@ public static class Builder RetrySettings settings = null; settings = RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(1000L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) .setInitialRpcTimeout(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeout(Duration.ofMillis(60000L)) .setTotalTimeout(Duration.ofMillis(60000L)) .build(); - definitions.put("retry_policy_1_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); + definitions.put("no_retry_1_params", settings); settings = RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) .setInitialRpcTimeout(Duration.ofMillis(60000L)) .setRpcTimeoutMultiplier(1.0) .setMaxRpcTimeout(Duration.ofMillis(60000L)) .setTotalTimeout(Duration.ofMillis(60000L)) .build(); - definitions.put("no_retry_1_params", settings); + definitions.put("retry_policy_0_params", settings); RETRY_PARAM_DEFINITIONS = definitions.build(); } protected Builder() { - this((ClientContext) null); + this(((ClientContext) null)); } protected Builder(ClientContext clientContext) { super(clientContext); getAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAccountsSettings = PagedCallSettings.newBuilder(LIST_ACCOUNTS_PAGE_STR_FACT); - deleteAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - provisionAccountTicketSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAccountSummariesSettings = PagedCallSettings.newBuilder(LIST_ACCOUNT_SUMMARIES_PAGE_STR_FACT); - getPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listPropertiesSettings = PagedCallSettings.newBuilder(LIST_PROPERTIES_PAGE_STR_FACT); - createPropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deletePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updatePropertySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchGetUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listUserLinksSettings = PagedCallSettings.newBuilder(LIST_USER_LINKS_PAGE_STR_FACT); - auditUserLinksSettings = PagedCallSettings.newBuilder(AUDIT_USER_LINKS_PAGE_STR_FACT); - createUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchCreateUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchUpdateUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteUserLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - batchDeleteUserLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getWebDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteWebDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateWebDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createWebDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listWebDataStreamsSettings = PagedCallSettings.newBuilder(LIST_WEB_DATA_STREAMS_PAGE_STR_FACT); - getIosAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteIosAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateIosAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createIosAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listIosAppDataStreamsSettings = PagedCallSettings.newBuilder(LIST_IOS_APP_DATA_STREAMS_PAGE_STR_FACT); - getAndroidAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteAndroidAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateAndroidAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createAndroidAppDataStreamSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAndroidAppDataStreamsSettings = PagedCallSettings.newBuilder(LIST_ANDROID_APP_DATA_STREAMS_PAGE_STR_FACT); - getEnhancedMeasurementSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateEnhancedMeasurementSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteFirebaseLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listFirebaseLinksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getGlobalSiteTagSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteGoogleAdsLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listGoogleAdsLinksSettings = PagedCallSettings.newBuilder(LIST_GOOGLE_ADS_LINKS_PAGE_STR_FACT); - getDataSharingSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = @@ -1536,21 +1487,127 @@ protected Builder(ClientContext clientContext) { deleteGoogleAdsLinkSettings, listGoogleAdsLinksSettings, getDataSharingSettingsSettings); - initDefaults(this); } + protected Builder(AnalyticsAdminServiceStubSettings settings) { + super(settings); + + getAccountSettings = settings.getAccountSettings.toBuilder(); + listAccountsSettings = settings.listAccountsSettings.toBuilder(); + deleteAccountSettings = settings.deleteAccountSettings.toBuilder(); + updateAccountSettings = settings.updateAccountSettings.toBuilder(); + provisionAccountTicketSettings = settings.provisionAccountTicketSettings.toBuilder(); + listAccountSummariesSettings = settings.listAccountSummariesSettings.toBuilder(); + getPropertySettings = settings.getPropertySettings.toBuilder(); + listPropertiesSettings = settings.listPropertiesSettings.toBuilder(); + createPropertySettings = settings.createPropertySettings.toBuilder(); + deletePropertySettings = settings.deletePropertySettings.toBuilder(); + updatePropertySettings = settings.updatePropertySettings.toBuilder(); + getUserLinkSettings = settings.getUserLinkSettings.toBuilder(); + batchGetUserLinksSettings = settings.batchGetUserLinksSettings.toBuilder(); + listUserLinksSettings = settings.listUserLinksSettings.toBuilder(); + auditUserLinksSettings = settings.auditUserLinksSettings.toBuilder(); + createUserLinkSettings = settings.createUserLinkSettings.toBuilder(); + batchCreateUserLinksSettings = settings.batchCreateUserLinksSettings.toBuilder(); + updateUserLinkSettings = settings.updateUserLinkSettings.toBuilder(); + batchUpdateUserLinksSettings = settings.batchUpdateUserLinksSettings.toBuilder(); + deleteUserLinkSettings = settings.deleteUserLinkSettings.toBuilder(); + batchDeleteUserLinksSettings = settings.batchDeleteUserLinksSettings.toBuilder(); + getWebDataStreamSettings = settings.getWebDataStreamSettings.toBuilder(); + deleteWebDataStreamSettings = settings.deleteWebDataStreamSettings.toBuilder(); + updateWebDataStreamSettings = settings.updateWebDataStreamSettings.toBuilder(); + createWebDataStreamSettings = settings.createWebDataStreamSettings.toBuilder(); + listWebDataStreamsSettings = settings.listWebDataStreamsSettings.toBuilder(); + getIosAppDataStreamSettings = settings.getIosAppDataStreamSettings.toBuilder(); + deleteIosAppDataStreamSettings = settings.deleteIosAppDataStreamSettings.toBuilder(); + updateIosAppDataStreamSettings = settings.updateIosAppDataStreamSettings.toBuilder(); + createIosAppDataStreamSettings = settings.createIosAppDataStreamSettings.toBuilder(); + listIosAppDataStreamsSettings = settings.listIosAppDataStreamsSettings.toBuilder(); + getAndroidAppDataStreamSettings = settings.getAndroidAppDataStreamSettings.toBuilder(); + deleteAndroidAppDataStreamSettings = settings.deleteAndroidAppDataStreamSettings.toBuilder(); + updateAndroidAppDataStreamSettings = settings.updateAndroidAppDataStreamSettings.toBuilder(); + createAndroidAppDataStreamSettings = settings.createAndroidAppDataStreamSettings.toBuilder(); + listAndroidAppDataStreamsSettings = settings.listAndroidAppDataStreamsSettings.toBuilder(); + getEnhancedMeasurementSettingsSettings = + settings.getEnhancedMeasurementSettingsSettings.toBuilder(); + updateEnhancedMeasurementSettingsSettings = + settings.updateEnhancedMeasurementSettingsSettings.toBuilder(); + createFirebaseLinkSettings = settings.createFirebaseLinkSettings.toBuilder(); + updateFirebaseLinkSettings = settings.updateFirebaseLinkSettings.toBuilder(); + deleteFirebaseLinkSettings = settings.deleteFirebaseLinkSettings.toBuilder(); + listFirebaseLinksSettings = settings.listFirebaseLinksSettings.toBuilder(); + getGlobalSiteTagSettings = settings.getGlobalSiteTagSettings.toBuilder(); + createGoogleAdsLinkSettings = settings.createGoogleAdsLinkSettings.toBuilder(); + updateGoogleAdsLinkSettings = settings.updateGoogleAdsLinkSettings.toBuilder(); + deleteGoogleAdsLinkSettings = settings.deleteGoogleAdsLinkSettings.toBuilder(); + listGoogleAdsLinksSettings = settings.listGoogleAdsLinksSettings.toBuilder(); + getDataSharingSettingsSettings = settings.getDataSharingSettingsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getAccountSettings, + listAccountsSettings, + deleteAccountSettings, + updateAccountSettings, + provisionAccountTicketSettings, + listAccountSummariesSettings, + getPropertySettings, + listPropertiesSettings, + createPropertySettings, + deletePropertySettings, + updatePropertySettings, + getUserLinkSettings, + batchGetUserLinksSettings, + listUserLinksSettings, + auditUserLinksSettings, + createUserLinkSettings, + batchCreateUserLinksSettings, + updateUserLinkSettings, + batchUpdateUserLinksSettings, + deleteUserLinkSettings, + batchDeleteUserLinksSettings, + getWebDataStreamSettings, + deleteWebDataStreamSettings, + updateWebDataStreamSettings, + createWebDataStreamSettings, + listWebDataStreamsSettings, + getIosAppDataStreamSettings, + deleteIosAppDataStreamSettings, + updateIosAppDataStreamSettings, + createIosAppDataStreamSettings, + listIosAppDataStreamsSettings, + getAndroidAppDataStreamSettings, + deleteAndroidAppDataStreamSettings, + updateAndroidAppDataStreamSettings, + createAndroidAppDataStreamSettings, + listAndroidAppDataStreamsSettings, + getEnhancedMeasurementSettingsSettings, + updateEnhancedMeasurementSettingsSettings, + createFirebaseLinkSettings, + updateFirebaseLinkSettings, + deleteFirebaseLinkSettings, + listFirebaseLinksSettings, + getGlobalSiteTagSettings, + createGoogleAdsLinkSettings, + updateGoogleAdsLinkSettings, + deleteGoogleAdsLinkSettings, + listGoogleAdsLinksSettings, + getDataSharingSettingsSettings); + } + private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); + Builder builder = new Builder(((ClientContext) null)); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); } private static Builder initDefaults(Builder builder) { - builder .getAccountSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -1578,8 +1635,8 @@ private static Builder initDefaults(Builder builder) { builder .listAccountSummariesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .getPropertySettings() @@ -1663,8 +1720,8 @@ private static Builder initDefaults(Builder builder) { builder .deleteWebDataStreamSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .updateWebDataStreamSettings() @@ -1788,119 +1845,13 @@ private static Builder initDefaults(Builder builder) { builder .getDataSharingSettingsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); return builder; } - protected Builder(AnalyticsAdminServiceStubSettings settings) { - super(settings); - - getAccountSettings = settings.getAccountSettings.toBuilder(); - listAccountsSettings = settings.listAccountsSettings.toBuilder(); - deleteAccountSettings = settings.deleteAccountSettings.toBuilder(); - updateAccountSettings = settings.updateAccountSettings.toBuilder(); - provisionAccountTicketSettings = settings.provisionAccountTicketSettings.toBuilder(); - listAccountSummariesSettings = settings.listAccountSummariesSettings.toBuilder(); - getPropertySettings = settings.getPropertySettings.toBuilder(); - listPropertiesSettings = settings.listPropertiesSettings.toBuilder(); - createPropertySettings = settings.createPropertySettings.toBuilder(); - deletePropertySettings = settings.deletePropertySettings.toBuilder(); - updatePropertySettings = settings.updatePropertySettings.toBuilder(); - getUserLinkSettings = settings.getUserLinkSettings.toBuilder(); - batchGetUserLinksSettings = settings.batchGetUserLinksSettings.toBuilder(); - listUserLinksSettings = settings.listUserLinksSettings.toBuilder(); - auditUserLinksSettings = settings.auditUserLinksSettings.toBuilder(); - createUserLinkSettings = settings.createUserLinkSettings.toBuilder(); - batchCreateUserLinksSettings = settings.batchCreateUserLinksSettings.toBuilder(); - updateUserLinkSettings = settings.updateUserLinkSettings.toBuilder(); - batchUpdateUserLinksSettings = settings.batchUpdateUserLinksSettings.toBuilder(); - deleteUserLinkSettings = settings.deleteUserLinkSettings.toBuilder(); - batchDeleteUserLinksSettings = settings.batchDeleteUserLinksSettings.toBuilder(); - getWebDataStreamSettings = settings.getWebDataStreamSettings.toBuilder(); - deleteWebDataStreamSettings = settings.deleteWebDataStreamSettings.toBuilder(); - updateWebDataStreamSettings = settings.updateWebDataStreamSettings.toBuilder(); - createWebDataStreamSettings = settings.createWebDataStreamSettings.toBuilder(); - listWebDataStreamsSettings = settings.listWebDataStreamsSettings.toBuilder(); - getIosAppDataStreamSettings = settings.getIosAppDataStreamSettings.toBuilder(); - deleteIosAppDataStreamSettings = settings.deleteIosAppDataStreamSettings.toBuilder(); - updateIosAppDataStreamSettings = settings.updateIosAppDataStreamSettings.toBuilder(); - createIosAppDataStreamSettings = settings.createIosAppDataStreamSettings.toBuilder(); - listIosAppDataStreamsSettings = settings.listIosAppDataStreamsSettings.toBuilder(); - getAndroidAppDataStreamSettings = settings.getAndroidAppDataStreamSettings.toBuilder(); - deleteAndroidAppDataStreamSettings = settings.deleteAndroidAppDataStreamSettings.toBuilder(); - updateAndroidAppDataStreamSettings = settings.updateAndroidAppDataStreamSettings.toBuilder(); - createAndroidAppDataStreamSettings = settings.createAndroidAppDataStreamSettings.toBuilder(); - listAndroidAppDataStreamsSettings = settings.listAndroidAppDataStreamsSettings.toBuilder(); - getEnhancedMeasurementSettingsSettings = - settings.getEnhancedMeasurementSettingsSettings.toBuilder(); - updateEnhancedMeasurementSettingsSettings = - settings.updateEnhancedMeasurementSettingsSettings.toBuilder(); - createFirebaseLinkSettings = settings.createFirebaseLinkSettings.toBuilder(); - updateFirebaseLinkSettings = settings.updateFirebaseLinkSettings.toBuilder(); - deleteFirebaseLinkSettings = settings.deleteFirebaseLinkSettings.toBuilder(); - listFirebaseLinksSettings = settings.listFirebaseLinksSettings.toBuilder(); - getGlobalSiteTagSettings = settings.getGlobalSiteTagSettings.toBuilder(); - createGoogleAdsLinkSettings = settings.createGoogleAdsLinkSettings.toBuilder(); - updateGoogleAdsLinkSettings = settings.updateGoogleAdsLinkSettings.toBuilder(); - deleteGoogleAdsLinkSettings = settings.deleteGoogleAdsLinkSettings.toBuilder(); - listGoogleAdsLinksSettings = settings.listGoogleAdsLinksSettings.toBuilder(); - getDataSharingSettingsSettings = settings.getDataSharingSettingsSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getAccountSettings, - listAccountsSettings, - deleteAccountSettings, - updateAccountSettings, - provisionAccountTicketSettings, - listAccountSummariesSettings, - getPropertySettings, - listPropertiesSettings, - createPropertySettings, - deletePropertySettings, - updatePropertySettings, - getUserLinkSettings, - batchGetUserLinksSettings, - listUserLinksSettings, - auditUserLinksSettings, - createUserLinkSettings, - batchCreateUserLinksSettings, - updateUserLinkSettings, - batchUpdateUserLinksSettings, - deleteUserLinkSettings, - batchDeleteUserLinksSettings, - getWebDataStreamSettings, - deleteWebDataStreamSettings, - updateWebDataStreamSettings, - createWebDataStreamSettings, - listWebDataStreamsSettings, - getIosAppDataStreamSettings, - deleteIosAppDataStreamSettings, - updateIosAppDataStreamSettings, - createIosAppDataStreamSettings, - listIosAppDataStreamsSettings, - getAndroidAppDataStreamSettings, - deleteAndroidAppDataStreamSettings, - updateAndroidAppDataStreamSettings, - createAndroidAppDataStreamSettings, - listAndroidAppDataStreamsSettings, - getEnhancedMeasurementSettingsSettings, - updateEnhancedMeasurementSettingsSettings, - createFirebaseLinkSettings, - updateFirebaseLinkSettings, - deleteFirebaseLinkSettings, - listFirebaseLinksSettings, - getGlobalSiteTagSettings, - createGoogleAdsLinkSettings, - updateGoogleAdsLinkSettings, - deleteGoogleAdsLinkSettings, - listGoogleAdsLinksSettings, - getDataSharingSettingsSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' + // NEXT_MAJOR_VER: remove 'throws Exception'. /** * Applies the given settings updater function to all of the unary API methods in this service. * diff --git a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java index a3ea57f8..5a753c12 100644 --- a/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java +++ b/google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/stub/GrpcAnalyticsAdminServiceCallableFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha.stub; -import com.google.api.core.BetaApi; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcCallableFactory; import com.google.api.gax.grpc.GrpcStubCallableFactory; @@ -31,18 +31,19 @@ import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC callable factory implementation for Google Analytics Admin API. + * gRPC callable factory implementation for the AnalyticsAdminService service API. * *

This class is for advanced usage. */ @Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public class GrpcAnalyticsAdminServiceCallableFactory implements GrpcStubCallableFactory { + @Override public UnaryCallable createUnaryCallable( GrpcCallSettings grpcCallSettings, @@ -55,61 +56,58 @@ public UnaryCallable createUnaryCalla public UnaryCallable createPagedCallable( GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, + PagedCallSettings callSettings, ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); } @Override public UnaryCallable createBatchingCallable( GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, + BatchingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") @Override public OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, ClientContext clientContext, OperationsStub operationsStub) { return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); + grpcCallSettings, callSettings, clientContext, operationsStub); } @Override public BidiStreamingCallable createBidiStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ServerStreamingCallable createServerStreamingCallable( GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, + ServerStreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } @Override public ClientStreamingCallable createClientStreamingCallable( GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, + StreamingCallSettings callSettings, ClientContext clientContext) { return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); + grpcCallSettings, callSettings, clientContext); } } diff --git a/google-analytics-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 38c1e71c..989977e1 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 @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha.stub; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; @@ -98,7 +99,6 @@ import com.google.analytics.admin.v1alpha.UpdateWebDataStreamRequest; import com.google.analytics.admin.v1alpha.UserLink; import com.google.analytics.admin.v1alpha.WebDataStream; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.grpc.GrpcCallSettings; @@ -107,6 +107,7 @@ import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -115,16 +116,14 @@ import java.util.concurrent.TimeUnit; import javax.annotation.Generated; -// AUTO-GENERATED DOCUMENTATION AND CLASS +// AUTO-GENERATED DOCUMENTATION AND CLASS. /** - * gRPC stub implementation for Google Analytics Admin API. + * gRPC stub implementation for the AnalyticsAdminService service API. * *

This class is for advanced usage and reflects the underlying API directly. */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +@Generated("by gapic-generator-java") public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { - private static final MethodDescriptor getAccountMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -132,6 +131,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetAccountRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Account.getDefaultInstance())) .build(); + private static final MethodDescriptor listAccountsMethodDescriptor = MethodDescriptor.newBuilder() @@ -142,6 +142,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListAccountsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteAccountMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -149,6 +150,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(DeleteAccountRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor updateAccountMethodDescriptor = MethodDescriptor.newBuilder() @@ -159,6 +161,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateAccountRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Account.getDefaultInstance())) .build(); + private static final MethodDescriptor< ProvisionAccountTicketRequest, ProvisionAccountTicketResponse> provisionAccountTicketMethodDescriptor = @@ -172,6 +175,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ProvisionAccountTicketResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor listAccountSummariesMethodDescriptor = MethodDescriptor.newBuilder() @@ -183,6 +187,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListAccountSummariesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getPropertyMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -190,6 +195,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetPropertyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) .build(); + private static final MethodDescriptor listPropertiesMethodDescriptor = MethodDescriptor.newBuilder() @@ -201,6 +207,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListPropertiesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor createPropertyMethodDescriptor = MethodDescriptor.newBuilder() @@ -211,6 +218,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreatePropertyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) .build(); + private static final MethodDescriptor deletePropertyMethodDescriptor = MethodDescriptor.newBuilder() @@ -221,6 +229,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeletePropertyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor updatePropertyMethodDescriptor = MethodDescriptor.newBuilder() @@ -231,6 +240,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdatePropertyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Property.getDefaultInstance())) .build(); + private static final MethodDescriptor getUserLinkMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -238,6 +248,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(GetUserLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) .build(); + private static final MethodDescriptor batchGetUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -249,6 +260,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(BatchGetUserLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor listUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -260,6 +272,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListUserLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor auditUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -271,6 +284,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(AuditUserLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor createUserLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -281,6 +295,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreateUserLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) .build(); + private static final MethodDescriptor batchCreateUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -292,6 +307,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(BatchCreateUserLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor updateUserLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -302,6 +318,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateUserLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(UserLink.getDefaultInstance())) .build(); + private static final MethodDescriptor batchUpdateUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -313,6 +330,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(BatchUpdateUserLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteUserLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -323,6 +341,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteUserLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor batchDeleteUserLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -333,6 +352,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(BatchDeleteUserLinksRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor getWebDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -343,6 +363,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(GetWebDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(WebDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteWebDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -353,6 +374,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteWebDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor updateWebDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -363,6 +385,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateWebDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(WebDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor createWebDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -373,6 +396,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreateWebDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(WebDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor listWebDataStreamsMethodDescriptor = MethodDescriptor.newBuilder() @@ -384,6 +408,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListWebDataStreamsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getIosAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -394,6 +419,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(GetIosAppDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(IosAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteIosAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -404,6 +430,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteIosAppDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor updateIosAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -414,6 +441,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateIosAppDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(IosAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor createIosAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -424,6 +452,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreateIosAppDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(IosAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor listIosAppDataStreamsMethodDescriptor = MethodDescriptor.newBuilder() @@ -435,6 +464,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListIosAppDataStreamsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getAndroidAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -446,6 +476,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(AndroidAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteAndroidAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -456,6 +487,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteAndroidAppDataStreamRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor updateAndroidAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -467,6 +499,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(AndroidAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor createAndroidAppDataStreamMethodDescriptor = MethodDescriptor.newBuilder() @@ -478,6 +511,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(AndroidAppDataStream.getDefaultInstance())) .build(); + private static final MethodDescriptor< ListAndroidAppDataStreamsRequest, ListAndroidAppDataStreamsResponse> listAndroidAppDataStreamsMethodDescriptor = @@ -491,6 +525,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListAndroidAppDataStreamsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor< GetEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> getEnhancedMeasurementSettingsMethodDescriptor = @@ -504,6 +539,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(EnhancedMeasurementSettings.getDefaultInstance())) .build(); + private static final MethodDescriptor< UpdateEnhancedMeasurementSettingsRequest, EnhancedMeasurementSettings> updateEnhancedMeasurementSettingsMethodDescriptor = @@ -518,6 +554,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(EnhancedMeasurementSettings.getDefaultInstance())) .build(); + private static final MethodDescriptor createFirebaseLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -528,6 +565,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreateFirebaseLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(FirebaseLink.getDefaultInstance())) .build(); + private static final MethodDescriptor updateFirebaseLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -538,6 +576,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateFirebaseLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(FirebaseLink.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteFirebaseLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -548,6 +587,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteFirebaseLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor listFirebaseLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -559,6 +599,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListFirebaseLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getGlobalSiteTagMethodDescriptor = MethodDescriptor.newBuilder() @@ -569,6 +610,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(GetGlobalSiteTagRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(GlobalSiteTag.getDefaultInstance())) .build(); + private static final MethodDescriptor createGoogleAdsLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -579,6 +621,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(CreateGoogleAdsLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(GoogleAdsLink.getDefaultInstance())) .build(); + private static final MethodDescriptor updateGoogleAdsLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -589,6 +632,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(UpdateGoogleAdsLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(GoogleAdsLink.getDefaultInstance())) .build(); + private static final MethodDescriptor deleteGoogleAdsLinkMethodDescriptor = MethodDescriptor.newBuilder() @@ -599,6 +643,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DeleteGoogleAdsLinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor listGoogleAdsLinksMethodDescriptor = MethodDescriptor.newBuilder() @@ -610,6 +655,7 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(ListGoogleAdsLinksResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor getDataSharingSettingsMethodDescriptor = MethodDescriptor.newBuilder() @@ -622,8 +668,6 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { ProtoUtils.marshaller(DataSharingSettings.getDefaultInstance())) .build(); - private final BackgroundResource backgroundResources; - private final UnaryCallable getAccountCallable; private final UnaryCallable listAccountsCallable; private final UnaryCallable @@ -716,6 +760,8 @@ public class GrpcAnalyticsAdminServiceStub extends AnalyticsAdminServiceStub { private final UnaryCallable getDataSharingSettingsCallable; + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; private final GrpcStubCallableFactory callableFactory; public static final GrpcAnalyticsAdminServiceStub create( @@ -756,6 +802,7 @@ protected GrpcAnalyticsAdminServiceStub( GrpcStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); GrpcCallSettings getAccountTransportSettings = GrpcCallSettings.newBuilder() @@ -1628,21 +1675,26 @@ public Map extract(GetDataSharingSettingsRequest request) { settings.getDataSharingSettingsSettings(), clientContext); - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } - public UnaryCallable getAccountCallable() { - return getAccountCallable; + public GrpcOperationsStub getOperationsStub() { + return operationsStub; } - public UnaryCallable listAccountsPagedCallable() { - return listAccountsPagedCallable; + public UnaryCallable getAccountCallable() { + return getAccountCallable; } public UnaryCallable listAccountsCallable() { return listAccountsCallable; } + public UnaryCallable listAccountsPagedCallable() { + return listAccountsPagedCallable; + } + public UnaryCallable deleteAccountCallable() { return deleteAccountCallable; } @@ -1656,29 +1708,29 @@ public UnaryCallable updateAccountCallable() { return provisionAccountTicketCallable; } - public UnaryCallable - listAccountSummariesPagedCallable() { - return listAccountSummariesPagedCallable; - } - public UnaryCallable listAccountSummariesCallable() { return listAccountSummariesCallable; } + public UnaryCallable + listAccountSummariesPagedCallable() { + return listAccountSummariesPagedCallable; + } + public UnaryCallable getPropertyCallable() { return getPropertyCallable; } + public UnaryCallable listPropertiesCallable() { + return listPropertiesCallable; + } + public UnaryCallable listPropertiesPagedCallable() { return listPropertiesPagedCallable; } - public UnaryCallable listPropertiesCallable() { - return listPropertiesCallable; - } - public UnaryCallable createPropertyCallable() { return createPropertyCallable; } @@ -1700,13 +1752,17 @@ public UnaryCallable getUserLinkCallable() { return batchGetUserLinksCallable; } + public UnaryCallable listUserLinksCallable() { + return listUserLinksCallable; + } + public UnaryCallable listUserLinksPagedCallable() { return listUserLinksPagedCallable; } - public UnaryCallable listUserLinksCallable() { - return listUserLinksCallable; + public UnaryCallable auditUserLinksCallable() { + return auditUserLinksCallable; } public UnaryCallable @@ -1714,10 +1770,6 @@ public UnaryCallable listUserLinksC return auditUserLinksPagedCallable; } - public UnaryCallable auditUserLinksCallable() { - return auditUserLinksCallable; - } - public UnaryCallable createUserLinkCallable() { return createUserLinkCallable; } @@ -1760,16 +1812,16 @@ public UnaryCallable createWebDataStr return createWebDataStreamCallable; } - public UnaryCallable - listWebDataStreamsPagedCallable() { - return listWebDataStreamsPagedCallable; - } - public UnaryCallable listWebDataStreamsCallable() { return listWebDataStreamsCallable; } + public UnaryCallable + listWebDataStreamsPagedCallable() { + return listWebDataStreamsPagedCallable; + } + public UnaryCallable getIosAppDataStreamCallable() { return getIosAppDataStreamCallable; } @@ -1788,16 +1840,16 @@ public UnaryCallable deleteIosAppDataStrea return createIosAppDataStreamCallable; } - public UnaryCallable - listIosAppDataStreamsPagedCallable() { - return listIosAppDataStreamsPagedCallable; - } - public UnaryCallable listIosAppDataStreamsCallable() { return listIosAppDataStreamsCallable; } + public UnaryCallable + listIosAppDataStreamsPagedCallable() { + return listIosAppDataStreamsPagedCallable; + } + public UnaryCallable getAndroidAppDataStreamCallable() { return getAndroidAppDataStreamCallable; @@ -1818,16 +1870,16 @@ public UnaryCallable deleteIosAppDataStrea return createAndroidAppDataStreamCallable; } - public UnaryCallable - listAndroidAppDataStreamsPagedCallable() { - return listAndroidAppDataStreamsPagedCallable; - } - public UnaryCallable listAndroidAppDataStreamsCallable() { return listAndroidAppDataStreamsCallable; } + public UnaryCallable + listAndroidAppDataStreamsPagedCallable() { + return listAndroidAppDataStreamsPagedCallable; + } + public UnaryCallable getEnhancedMeasurementSettingsCallable() { return getEnhancedMeasurementSettingsCallable; @@ -1871,16 +1923,16 @@ public UnaryCallable deleteGoogleAdsLinkCalla return deleteGoogleAdsLinkCallable; } - public UnaryCallable - listGoogleAdsLinksPagedCallable() { - return listGoogleAdsLinksPagedCallable; - } - public UnaryCallable listGoogleAdsLinksCallable() { return listGoogleAdsLinksCallable; } + public UnaryCallable + listGoogleAdsLinksPagedCallable() { + return listGoogleAdsLinksPagedCallable; + } + 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 2928132b..baf9a950 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 @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha; import static com.google.analytics.admin.v1alpha.AnalyticsAdminServiceClient.AuditUserLinksPagedResponse; @@ -34,15 +35,17 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.BoolValue; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; -import io.grpc.Status; +import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; +import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; import org.junit.Assert; @@ -50,32 +53,32 @@ import org.junit.BeforeClass; import org.junit.Test; -@javax.annotation.Generated("by GAPIC") +@Generated("by gapic-generator-java") public class AnalyticsAdminServiceClientTest { private static MockAnalyticsAdminService mockAnalyticsAdminService; - private static MockServiceHelper serviceHelper; + private static MockServiceHelper mockServiceHelper; private AnalyticsAdminServiceClient client; private LocalChannelProvider channelProvider; @BeforeClass public static void startStaticServer() { mockAnalyticsAdminService = new MockAnalyticsAdminService(); - serviceHelper = + mockServiceHelper = new MockServiceHelper( UUID.randomUUID().toString(), Arrays.asList(mockAnalyticsAdminService)); - serviceHelper.start(); + mockServiceHelper.start(); } @AfterClass public static void stopServer() { - serviceHelper.stop(); + mockServiceHelper.stop(); } @Before public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); AnalyticsAdminServiceSettings settings = AnalyticsAdminServiceSettings.newBuilder() .setTransportChannelProvider(channelProvider) @@ -90,18 +93,15 @@ public void tearDown() throws Exception { } @Test - @SuppressWarnings("all") - public void getAccountTest() { - AccountName name2 = AccountName.of("[ACCOUNT]"); - String displayName = "displayName1615086568"; - String countryCode = "countryCode1481071862"; - boolean deleted = false; + public void getAccountTest() throws Exception { Account expectedResponse = Account.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setCountryCode(countryCode) - .setDeleted(deleted) + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setCountryCode("countryCode-1477067101") + .setDeleted(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -112,9 +112,9 @@ public void getAccountTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetAccountRequest actualRequest = (GetAccountRequest) actualRequests.get(0); + GetAccountRequest actualRequest = ((GetAccountRequest) actualRequests.get(0)); - Assert.assertEquals(name, AccountName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -122,46 +122,93 @@ public void getAccountTest() { } @Test - @SuppressWarnings("all") public void getAccountExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AccountName name = AccountName.of("[ACCOUNT]"); + client.getAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAccountTest2() throws Exception { + Account expectedResponse = + Account.newBuilder() + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setCountryCode("countryCode-1477067101") + .setDeleted(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + Account actualResponse = client.getAccount(name); + Assert.assertEquals(expectedResponse, actualResponse); + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAccountRequest actualRequest = ((GetAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAccountExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getAccount(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listAccountsTest() { - String nextPageToken = ""; - Account accountsElement = Account.newBuilder().build(); - List accounts = Arrays.asList(accountsElement); + public void listAccountsTest() throws Exception { + Account responsesElement = Account.newBuilder().build(); ListAccountsResponse expectedResponse = ListAccountsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllAccounts(accounts) + .setNextPageToken("") + .addAllAccounts(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ListAccountsRequest request = ListAccountsRequest.newBuilder().build(); + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); ListAccountsPagedResponse pagedListResponse = client.listAccounts(request); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getAccountsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAccountsRequest actualRequest = (ListAccountsRequest) actualRequests.get(0); + ListAccountsRequest actualRequest = ((ListAccountsRequest) actualRequests.get(0)); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getShowDeleted(), actualRequest.getShowDeleted()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -169,24 +216,26 @@ public void listAccountsTest() { } @Test - @SuppressWarnings("all") public void listAccountsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ListAccountsRequest request = ListAccountsRequest.newBuilder().build(); - + ListAccountsRequest request = + ListAccountsRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); client.listAccounts(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteAccountTest() { + public void deleteAccountTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -196,9 +245,9 @@ public void deleteAccountTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAccountRequest actualRequest = (DeleteAccountRequest) actualRequests.get(0); + DeleteAccountRequest actualRequest = ((DeleteAccountRequest) actualRequests.get(0)); - Assert.assertEquals(name, AccountName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -206,34 +255,63 @@ public void deleteAccountTest() { } @Test - @SuppressWarnings("all") public void deleteAccountExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AccountName name = AccountName.of("[ACCOUNT]"); + client.deleteAccount(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAccountTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAccount(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAccountRequest actualRequest = ((DeleteAccountRequest) actualRequests.get(0)); + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAccountExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.deleteAccount(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateAccountTest() { - AccountName name = AccountName.of("[ACCOUNT]"); - String displayName = "displayName1615086568"; - String countryCode = "countryCode1481071862"; - boolean deleted = false; + public void updateAccountTest() throws Exception { Account expectedResponse = Account.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setCountryCode(countryCode) - .setDeleted(deleted) + .setName(AccountName.of("[ACCOUNT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDisplayName("displayName1714148973") + .setCountryCode("countryCode-1477067101") + .setDeleted(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -245,7 +323,7 @@ public void updateAccountTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateAccountRequest actualRequest = (UpdateAccountRequest) actualRequests.get(0); + UpdateAccountRequest actualRequest = ((UpdateAccountRequest) actualRequests.get(0)); Assert.assertEquals(account, actualRequest.getAccount()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -256,31 +334,33 @@ public void updateAccountTest() { } @Test - @SuppressWarnings("all") public void updateAccountExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { Account account = Account.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAccount(account, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void provisionAccountTicketTest() { - String accountTicketId = "accountTicketId-442102884"; + public void provisionAccountTicketTest() throws Exception { ProvisionAccountTicketResponse expectedResponse = - ProvisionAccountTicketResponse.newBuilder().setAccountTicketId(accountTicketId).build(); + ProvisionAccountTicketResponse.newBuilder() + .setAccountTicketId("accountTicketId-1576709484") + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ProvisionAccountTicketRequest request = ProvisionAccountTicketRequest.newBuilder().build(); + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); ProvisionAccountTicketResponse actualResponse = client.provisionAccountTicket(request); Assert.assertEquals(expectedResponse, actualResponse); @@ -288,8 +368,10 @@ public void provisionAccountTicketTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ProvisionAccountTicketRequest actualRequest = - (ProvisionAccountTicketRequest) actualRequests.get(0); + ((ProvisionAccountTicketRequest) actualRequests.get(0)); + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getRedirectUri(), actualRequest.getRedirectUri()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -297,46 +379,53 @@ public void provisionAccountTicketTest() { } @Test - @SuppressWarnings("all") public void provisionAccountTicketExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ProvisionAccountTicketRequest request = ProvisionAccountTicketRequest.newBuilder().build(); - + ProvisionAccountTicketRequest request = + ProvisionAccountTicketRequest.newBuilder() + .setAccount(Account.newBuilder().build()) + .setRedirectUri("redirectUri1970337776") + .build(); client.provisionAccountTicket(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listAccountSummariesTest() { - String nextPageToken = ""; - AccountSummary accountSummariesElement = AccountSummary.newBuilder().build(); - List accountSummaries = Arrays.asList(accountSummariesElement); + public void listAccountSummariesTest() throws Exception { + AccountSummary responsesElement = AccountSummary.newBuilder().build(); ListAccountSummariesResponse expectedResponse = ListAccountSummariesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllAccountSummaries(accountSummaries) + .setNextPageToken("") + .addAllAccountSummaries(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build(); + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); ListAccountSummariesPagedResponse pagedListResponse = client.listAccountSummaries(request); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getAccountSummariesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListAccountSummariesRequest actualRequest = (ListAccountSummariesRequest) actualRequests.get(0); + ListAccountSummariesRequest actualRequest = + ((ListAccountSummariesRequest) actualRequests.get(0)); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -344,38 +433,35 @@ public void listAccountSummariesTest() { } @Test - @SuppressWarnings("all") public void listAccountSummariesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - ListAccountSummariesRequest request = ListAccountSummariesRequest.newBuilder().build(); - + ListAccountSummariesRequest request = + ListAccountSummariesRequest.newBuilder() + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); client.listAccountSummaries(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getPropertyTest() { - PropertyName name2 = PropertyName.of("[PROPERTY]"); - String parent = "parent-995424086"; - String displayName = "displayName1615086568"; - String timeZone = "timeZone36848094"; - String currencyCode = "currencyCode1108728155"; - boolean deleted = false; + public void getPropertyTest() throws Exception { Property expectedResponse = Property.newBuilder() - .setName(name2.toString()) - .setParent(parent) - .setDisplayName(displayName) - .setTimeZone(timeZone) - .setCurrencyCode(currencyCode) - .setDeleted(deleted) + .setName(PropertyName.of("[PROPERTY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setDeleted(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -386,9 +472,9 @@ public void getPropertyTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetPropertyRequest actualRequest = (GetPropertyRequest) actualRequests.get(0); + GetPropertyRequest actualRequest = ((GetPropertyRequest) actualRequests.get(0)); - Assert.assertEquals(name, PropertyName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -396,48 +482,97 @@ public void getPropertyTest() { } @Test - @SuppressWarnings("all") public void getPropertyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName name = PropertyName.of("[PROPERTY]"); + client.getProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPropertyTest2() throws Exception { + Property expectedResponse = + Property.newBuilder() + .setName(PropertyName.of("[PROPERTY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setDeleted(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + Property actualResponse = client.getProperty(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPropertyRequest actualRequest = ((GetPropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPropertyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String name = "name3373707"; client.getProperty(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listPropertiesTest() { - String nextPageToken = ""; - Property propertiesElement = Property.newBuilder().build(); - List properties = Arrays.asList(propertiesElement); + public void listPropertiesTest() throws Exception { + Property responsesElement = Property.newBuilder().build(); ListPropertiesResponse expectedResponse = ListPropertiesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllProperties(properties) + .setNextPageToken("") + .addAllProperties(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - String filter = "filter-1274492040"; - ListPropertiesRequest request = ListPropertiesRequest.newBuilder().setFilter(filter).build(); + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); ListPropertiesPagedResponse pagedListResponse = client.listProperties(request); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getPropertiesList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListPropertiesRequest actualRequest = (ListPropertiesRequest) actualRequests.get(0); + ListPropertiesRequest actualRequest = ((ListPropertiesRequest) actualRequests.get(0)); - Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getShowDeleted(), actualRequest.getShowDeleted()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -445,39 +580,37 @@ public void listPropertiesTest() { } @Test - @SuppressWarnings("all") public void listPropertiesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - String filter = "filter-1274492040"; - ListPropertiesRequest request = ListPropertiesRequest.newBuilder().setFilter(filter).build(); - + ListPropertiesRequest request = + ListPropertiesRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setShowDeleted(true) + .build(); client.listProperties(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createPropertyTest() { - PropertyName name = PropertyName.of("[PROPERTY]"); - String parent = "parent-995424086"; - String displayName = "displayName1615086568"; - String timeZone = "timeZone36848094"; - String currencyCode = "currencyCode1108728155"; - boolean deleted = false; + public void createPropertyTest() throws Exception { Property expectedResponse = Property.newBuilder() - .setName(name.toString()) - .setParent(parent) - .setDisplayName(displayName) - .setTimeZone(timeZone) - .setCurrencyCode(currencyCode) - .setDeleted(deleted) + .setName(PropertyName.of("[PROPERTY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setDeleted(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -488,7 +621,7 @@ public void createPropertyTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreatePropertyRequest actualRequest = (CreatePropertyRequest) actualRequests.get(0); + CreatePropertyRequest actualRequest = ((CreatePropertyRequest) actualRequests.get(0)); Assert.assertEquals(property, actualRequest.getProperty()); Assert.assertTrue( @@ -498,24 +631,21 @@ public void createPropertyTest() { } @Test - @SuppressWarnings("all") public void createPropertyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { Property property = Property.newBuilder().build(); - client.createProperty(property); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deletePropertyTest() { + public void deletePropertyTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -525,9 +655,9 @@ public void deletePropertyTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeletePropertyRequest actualRequest = (DeletePropertyRequest) actualRequests.get(0); + DeletePropertyRequest actualRequest = ((DeletePropertyRequest) actualRequests.get(0)); - Assert.assertEquals(name, PropertyName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -535,38 +665,65 @@ public void deletePropertyTest() { } @Test - @SuppressWarnings("all") public void deletePropertyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName name = PropertyName.of("[PROPERTY]"); + client.deleteProperty(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePropertyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProperty(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePropertyRequest actualRequest = ((DeletePropertyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePropertyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String name = "name3373707"; client.deleteProperty(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updatePropertyTest() { - PropertyName name = PropertyName.of("[PROPERTY]"); - String parent = "parent-995424086"; - String displayName = "displayName1615086568"; - String timeZone = "timeZone36848094"; - String currencyCode = "currencyCode1108728155"; - boolean deleted = false; + public void updatePropertyTest() throws Exception { Property expectedResponse = Property.newBuilder() - .setName(name.toString()) - .setParent(parent) - .setDisplayName(displayName) - .setTimeZone(timeZone) - .setCurrencyCode(currencyCode) - .setDeleted(deleted) + .setName(PropertyName.of("[PROPERTY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setParent("parent-995424086") + .setDisplayName("displayName1714148973") + .setTimeZone("timeZone-2077180903") + .setCurrencyCode("currencyCode1004773790") + .setDeleted(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -578,7 +735,7 @@ public void updatePropertyTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdatePropertyRequest actualRequest = (UpdatePropertyRequest) actualRequests.get(0); + UpdatePropertyRequest actualRequest = ((UpdatePropertyRequest) actualRequests.get(0)); Assert.assertEquals(property, actualRequest.getProperty()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -589,29 +746,28 @@ public void updatePropertyTest() { } @Test - @SuppressWarnings("all") public void updatePropertyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { Property property = Property.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateProperty(property, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getUserLinkTest() { - UserLinkName name2 = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - String emailAddress = "emailAddress-769510831"; + public void getUserLinkTest() throws Exception { UserLink expectedResponse = - UserLink.newBuilder().setName(name2.toString()).setEmailAddress(emailAddress).build(); + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); @@ -621,9 +777,9 @@ public void getUserLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetUserLinkRequest actualRequest = (GetUserLinkRequest) actualRequests.get(0); + GetUserLinkRequest actualRequest = ((GetUserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, UserLinkName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -631,33 +787,69 @@ public void getUserLinkTest() { } @Test - @SuppressWarnings("all") public void getUserLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + client.getUserLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserLinkTest2() throws Exception { + UserLink expectedResponse = + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + UserLink actualResponse = client.getUserLink(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserLinkRequest actualRequest = ((GetUserLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getUserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchGetUserLinksTest() { - BatchGetUserLinksResponse expectedResponse = BatchGetUserLinksResponse.newBuilder().build(); + public void batchGetUserLinksTest() throws Exception { + BatchGetUserLinksResponse expectedResponse = + BatchGetUserLinksResponse.newBuilder().addAllUserLinks(new ArrayList()).build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - List names = new ArrayList<>(); BatchGetUserLinksRequest request = BatchGetUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllNames(UserLinkName.toStringList(names)) + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllNames(new ArrayList()) .build(); BatchGetUserLinksResponse actualResponse = client.batchGetUserLinks(request); @@ -665,10 +857,10 @@ public void batchGetUserLinksTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchGetUserLinksRequest actualRequest = (BatchGetUserLinksRequest) actualRequests.get(0); + BatchGetUserLinksRequest actualRequest = ((BatchGetUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); - Assert.assertEquals(names, UserLinkName.parseList(actualRequest.getNamesList())); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getNamesList(), actualRequest.getNamesList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -676,37 +868,30 @@ public void batchGetUserLinksTest() { } @Test - @SuppressWarnings("all") public void batchGetUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - List names = new ArrayList<>(); BatchGetUserLinksRequest request = BatchGetUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllNames(UserLinkName.toStringList(names)) + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllNames(new ArrayList()) .build(); - client.batchGetUserLinks(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listUserLinksTest() { - String nextPageToken = ""; - UserLink userLinksElement = UserLink.newBuilder().build(); - List userLinks = Arrays.asList(userLinksElement); + public void listUserLinksTest() throws Exception { + UserLink responsesElement = UserLink.newBuilder().build(); ListUserLinksResponse expectedResponse = ListUserLinksResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllUserLinks(userLinks) + .setNextPageToken("") + .addAllUserLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -715,14 +900,15 @@ public void listUserLinksTest() { ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListUserLinksRequest actualRequest = (ListUserLinksRequest) actualRequests.get(0); + ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -730,49 +916,43 @@ public void listUserLinksTest() { } @Test - @SuppressWarnings("all") public void listUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AccountName parent = AccountName.of("[ACCOUNT]"); - client.listUserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void auditUserLinksTest() { - String nextPageToken = ""; - AuditUserLink userLinksElement = AuditUserLink.newBuilder().build(); - List userLinks = Arrays.asList(userLinksElement); - AuditUserLinksResponse expectedResponse = - AuditUserLinksResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllUserLinks(userLinks) + public void listUserLinksTest2() throws Exception { + UserLink responsesElement = UserLink.newBuilder().build(); + ListUserLinksResponse expectedResponse = + ListUserLinksResponse.newBuilder() + .setNextPageToken("") + .addAllUserLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder().setParent(parent.toString()).build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); - AuditUserLinksPagedResponse pagedListResponse = client.auditUserLinks(request); + ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - AuditUserLinksRequest actualRequest = (AuditUserLinksRequest) actualRequests.get(0); + ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -780,44 +960,43 @@ public void auditUserLinksTest() { } @Test - @SuppressWarnings("all") - public void auditUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void listUserLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - AuditUserLinksRequest request = - AuditUserLinksRequest.newBuilder().setParent(parent.toString()).build(); - - client.auditUserLinks(request); + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listUserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createUserLinkTest() { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - String emailAddress = "emailAddress-769510831"; - UserLink expectedResponse = - UserLink.newBuilder().setName(name.toString()).setEmailAddress(emailAddress).build(); + public void listUserLinksTest3() throws Exception { + UserLink responsesElement = UserLink.newBuilder().build(); + ListUserLinksResponse expectedResponse = + ListUserLinksResponse.newBuilder() + .setNextPageToken("") + .addAllUserLinks(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); + String parent = "parent-995424086"; - UserLink actualResponse = client.createUserLink(parent, userLink); - Assert.assertEquals(expectedResponse, actualResponse); + ListUserLinksPagedResponse pagedListResponse = client.listUserLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateUserLinkRequest actualRequest = (CreateUserLinkRequest) actualRequests.get(0); + ListUserLinksRequest actualRequest = ((ListUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); - Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertEquals(parent, actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -825,46 +1004,50 @@ public void createUserLinkTest() { } @Test - @SuppressWarnings("all") - public void createUserLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void listUserLinksExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - UserLink userLink = UserLink.newBuilder().build(); - - client.createUserLink(parent, userLink); + String parent = "parent-995424086"; + client.listUserLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchCreateUserLinksTest() { - BatchCreateUserLinksResponse expectedResponse = - BatchCreateUserLinksResponse.newBuilder().build(); + public void auditUserLinksTest() throws Exception { + AuditUserLink responsesElement = AuditUserLink.newBuilder().build(); + AuditUserLinksResponse expectedResponse = + AuditUserLinksResponse.newBuilder() + .setNextPageToken("") + .addAllUserLinks(Arrays.asList(responsesElement)) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) + AuditUserLinksRequest request = + AuditUserLinksRequest.newBuilder() + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") .build(); - BatchCreateUserLinksResponse actualResponse = client.batchCreateUserLinks(request); - Assert.assertEquals(expectedResponse, actualResponse); + AuditUserLinksPagedResponse pagedListResponse = client.auditUserLinks(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchCreateUserLinksRequest actualRequest = (BatchCreateUserLinksRequest) actualRequests.get(0); + AuditUserLinksRequest actualRequest = ((AuditUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); - Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -872,45 +1055,45 @@ public void batchCreateUserLinksTest() { } @Test - @SuppressWarnings("all") - public void batchCreateUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void auditUserLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); - BatchCreateUserLinksRequest request = - BatchCreateUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) + AuditUserLinksRequest request = + AuditUserLinksRequest.newBuilder() + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") .build(); - - client.batchCreateUserLinks(request); + client.auditUserLinks(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateUserLinkTest() { - UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); - String emailAddress = "emailAddress-769510831"; + public void createUserLinkTest() throws Exception { UserLink expectedResponse = - UserLink.newBuilder().setName(name.toString()).setEmailAddress(emailAddress).build(); + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); + AccountName parent = AccountName.of("[ACCOUNT]"); UserLink userLink = UserLink.newBuilder().build(); - UserLink actualResponse = client.updateUserLink(userLink); + UserLink actualResponse = client.createUserLink(parent, userLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateUserLinkRequest actualRequest = (UpdateUserLinkRequest) actualRequests.get(0); + CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(userLink, actualRequest.getUserLink()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -919,45 +1102,42 @@ public void updateUserLinkTest() { } @Test - @SuppressWarnings("all") - public void updateUserLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void createUserLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { + AccountName parent = AccountName.of("[ACCOUNT]"); UserLink userLink = UserLink.newBuilder().build(); - - client.updateUserLink(userLink); + client.createUserLink(parent, userLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchUpdateUserLinksTest() { - BatchUpdateUserLinksResponse expectedResponse = - BatchUpdateUserLinksResponse.newBuilder().build(); + public void createUserLinkTest2() throws Exception { + UserLink expectedResponse = + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); - BatchUpdateUserLinksRequest request = - BatchUpdateUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) - .build(); + PropertyName parent = PropertyName.of("[PROPERTY]"); + UserLink userLink = UserLink.newBuilder().build(); - BatchUpdateUserLinksResponse actualResponse = client.batchUpdateUserLinks(request); + UserLink actualResponse = client.createUserLink(parent, userLink); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchUpdateUserLinksRequest actualRequest = (BatchUpdateUserLinksRequest) actualRequests.get(0); + CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); - Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(userLink, actualRequest.getUserLink()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -965,30 +1145,204 @@ public void batchUpdateUserLinksTest() { } @Test - @SuppressWarnings("all") - public void batchUpdateUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void createUserLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + UserLink userLink = UserLink.newBuilder().build(); + client.createUserLink(parent, userLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createUserLinkTest3() throws Exception { + UserLink expectedResponse = + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + UserLink userLink = UserLink.newBuilder().build(); + + UserLink actualResponse = client.createUserLink(parent, userLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateUserLinkRequest actualRequest = ((CreateUserLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createUserLinkExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + UserLink userLink = UserLink.newBuilder().build(); + client.createUserLink(parent, userLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchCreateUserLinksTest() throws Exception { + BatchCreateUserLinksResponse expectedResponse = + BatchCreateUserLinksResponse.newBuilder() + .addAllUserLinks(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + BatchCreateUserLinksRequest request = + BatchCreateUserLinksRequest.newBuilder() + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setNotifyNewUsers(true) + .addAllRequests(new ArrayList()) + .build(); + + BatchCreateUserLinksResponse actualResponse = client.batchCreateUserLinks(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchCreateUserLinksRequest actualRequest = + ((BatchCreateUserLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getNotifyNewUsers(), actualRequest.getNotifyNewUsers()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchCreateUserLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + BatchCreateUserLinksRequest request = + BatchCreateUserLinksRequest.newBuilder() + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setNotifyNewUsers(true) + .addAllRequests(new ArrayList()) + .build(); + client.batchCreateUserLinks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserLinkTest() throws Exception { + UserLink expectedResponse = + UserLink.newBuilder() + .setName(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .setEmailAddress("emailAddress-1070931784") + .addAllDirectRoles(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + UserLink userLink = UserLink.newBuilder().build(); + + UserLink actualResponse = client.updateUserLink(userLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateUserLinkRequest actualRequest = ((UpdateUserLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(userLink, actualRequest.getUserLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateUserLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + UserLink userLink = UserLink.newBuilder().build(); + client.updateUserLink(userLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateUserLinksTest() throws Exception { + BatchUpdateUserLinksResponse expectedResponse = + BatchUpdateUserLinksResponse.newBuilder() + .addAllUserLinks(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + BatchUpdateUserLinksRequest request = + BatchUpdateUserLinksRequest.newBuilder() + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllRequests(new ArrayList()) + .build(); + + BatchUpdateUserLinksResponse actualResponse = client.batchUpdateUserLinks(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateUserLinksRequest actualRequest = + ((BatchUpdateUserLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchUpdateUserLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); BatchUpdateUserLinksRequest request = BatchUpdateUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllRequests(new ArrayList()) .build(); - client.batchUpdateUserLinks(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteUserLinkTest() { + public void deleteUserLinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -998,9 +1352,9 @@ public void deleteUserLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteUserLinkRequest actualRequest = (DeleteUserLinkRequest) actualRequests.get(0); + DeleteUserLinkRequest actualRequest = ((DeleteUserLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, UserLinkName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1008,43 +1362,73 @@ public void deleteUserLinkTest() { } @Test - @SuppressWarnings("all") public void deleteUserLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { UserLinkName name = UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]"); + client.deleteUserLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void deleteUserLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteUserLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteUserLinkRequest actualRequest = ((DeleteUserLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteUserLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.deleteUserLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void batchDeleteUserLinksTest() { + public void batchDeleteUserLinksTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); BatchDeleteUserLinksRequest request = BatchDeleteUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllRequests(new ArrayList()) .build(); client.batchDeleteUserLinks(request); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchDeleteUserLinksRequest actualRequest = (BatchDeleteUserLinksRequest) actualRequests.get(0); + BatchDeleteUserLinksRequest actualRequest = + ((BatchDeleteUserLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, AccountName.parse(actualRequest.getParent())); - Assert.assertEquals(requests, actualRequest.getRequestsList()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getRequestsList(), actualRequest.getRequestsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1052,42 +1436,34 @@ public void batchDeleteUserLinksTest() { } @Test - @SuppressWarnings("all") public void batchDeleteUserLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - AccountName parent = AccountName.of("[ACCOUNT]"); - List requests = new ArrayList<>(); BatchDeleteUserLinksRequest request = BatchDeleteUserLinksRequest.newBuilder() - .setParent(parent.toString()) - .addAllRequests(requests) + .setParent(UserLinkName.ofAccountUserLinkName("[ACCOUNT]", "[USER_LINK]").toString()) + .addAllRequests(new ArrayList()) .build(); - client.batchDeleteUserLinks(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getWebDataStreamTest() { - WebDataStreamName name2 = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - String measurementId = "measurementId-223204226"; - String firebaseAppId = "firebaseAppId605863217"; - String defaultUri = "defaultUri-436616594"; - String displayName = "displayName1615086568"; + public void getWebDataStreamTest() throws Exception { WebDataStream expectedResponse = WebDataStream.newBuilder() - .setName(name2.toString()) - .setMeasurementId(measurementId) - .setFirebaseAppId(firebaseAppId) - .setDefaultUri(defaultUri) - .setDisplayName(displayName) + .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setMeasurementId("measurementId1655367159") + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDefaultUri("defaultUri678642539") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1098,9 +1474,9 @@ public void getWebDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetWebDataStreamRequest actualRequest = (GetWebDataStreamRequest) actualRequests.get(0); + GetWebDataStreamRequest actualRequest = ((GetWebDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, WebDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1108,24 +1484,65 @@ public void getWebDataStreamTest() { } @Test - @SuppressWarnings("all") public void getWebDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + client.getWebDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getWebDataStreamTest2() throws Exception { + WebDataStream expectedResponse = + WebDataStream.newBuilder() + .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setMeasurementId("measurementId1655367159") + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDefaultUri("defaultUri678642539") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + WebDataStream actualResponse = client.getWebDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetWebDataStreamRequest actualRequest = ((GetWebDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getWebDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getWebDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteWebDataStreamTest() { + public void deleteWebDataStreamTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1135,9 +1552,9 @@ public void deleteWebDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteWebDataStreamRequest actualRequest = (DeleteWebDataStreamRequest) actualRequests.get(0); + DeleteWebDataStreamRequest actualRequest = ((DeleteWebDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, WebDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1145,36 +1562,64 @@ public void deleteWebDataStreamTest() { } @Test - @SuppressWarnings("all") public void deleteWebDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + client.deleteWebDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteWebDataStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteWebDataStream(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteWebDataStreamRequest actualRequest = ((DeleteWebDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteWebDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String name = "name3373707"; client.deleteWebDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateWebDataStreamTest() { - WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - String measurementId = "measurementId-223204226"; - String firebaseAppId = "firebaseAppId605863217"; - String defaultUri = "defaultUri-436616594"; - String displayName = "displayName1615086568"; + public void updateWebDataStreamTest() throws Exception { WebDataStream expectedResponse = WebDataStream.newBuilder() - .setName(name.toString()) - .setMeasurementId(measurementId) - .setFirebaseAppId(firebaseAppId) - .setDefaultUri(defaultUri) - .setDisplayName(displayName) + .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setMeasurementId("measurementId1655367159") + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDefaultUri("defaultUri678642539") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1186,7 +1631,7 @@ public void updateWebDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateWebDataStreamRequest actualRequest = (UpdateWebDataStreamRequest) actualRequests.get(0); + UpdateWebDataStreamRequest actualRequest = ((UpdateWebDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(webDataStream, actualRequest.getWebDataStream()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -1197,37 +1642,31 @@ public void updateWebDataStreamTest() { } @Test - @SuppressWarnings("all") public void updateWebDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { WebDataStream webDataStream = WebDataStream.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateWebDataStream(webDataStream, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createWebDataStreamTest() { - WebDataStreamName name = WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - String measurementId = "measurementId-223204226"; - String firebaseAppId = "firebaseAppId605863217"; - String defaultUri = "defaultUri-436616594"; - String displayName = "displayName1615086568"; + public void createWebDataStreamTest() throws Exception { WebDataStream expectedResponse = WebDataStream.newBuilder() - .setName(name.toString()) - .setMeasurementId(measurementId) - .setFirebaseAppId(firebaseAppId) - .setDefaultUri(defaultUri) - .setDisplayName(displayName) + .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setMeasurementId("measurementId1655367159") + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDefaultUri("defaultUri678642539") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1239,9 +1678,9 @@ public void createWebDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateWebDataStreamRequest actualRequest = (CreateWebDataStreamRequest) actualRequests.get(0); + CreateWebDataStreamRequest actualRequest = ((CreateWebDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(webDataStream, actualRequest.getWebDataStream()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -1250,32 +1689,74 @@ public void createWebDataStreamTest() { } @Test - @SuppressWarnings("all") public void createWebDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); WebDataStream webDataStream = WebDataStream.newBuilder().build(); + client.createWebDataStream(parent, webDataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createWebDataStreamTest2() throws Exception { + WebDataStream expectedResponse = + WebDataStream.newBuilder() + .setName(WebDataStreamName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setMeasurementId("measurementId1655367159") + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDefaultUri("defaultUri678642539") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + String parent = "parent-995424086"; + WebDataStream webDataStream = WebDataStream.newBuilder().build(); + + WebDataStream actualResponse = client.createWebDataStream(parent, webDataStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateWebDataStreamRequest actualRequest = ((CreateWebDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(webDataStream, actualRequest.getWebDataStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createWebDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + WebDataStream webDataStream = WebDataStream.newBuilder().build(); client.createWebDataStream(parent, webDataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listWebDataStreamsTest() { - String nextPageToken = ""; - WebDataStream webDataStreamsElement = WebDataStream.newBuilder().build(); - List webDataStreams = Arrays.asList(webDataStreamsElement); + public void listWebDataStreamsTest() throws Exception { + WebDataStream responsesElement = WebDataStream.newBuilder().build(); ListWebDataStreamsResponse expectedResponse = ListWebDataStreamsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllWebDataStreams(webDataStreams) + .setNextPageToken("") + .addAllWebDataStreams(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1284,14 +1765,15 @@ public void listWebDataStreamsTest() { ListWebDataStreamsPagedResponse pagedListResponse = client.listWebDataStreams(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getWebDataStreamsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListWebDataStreamsRequest actualRequest = (ListWebDataStreamsRequest) actualRequests.get(0); + ListWebDataStreamsRequest actualRequest = ((ListWebDataStreamsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1299,47 +1781,164 @@ public void listWebDataStreamsTest() { } @Test - @SuppressWarnings("all") public void listWebDataStreamsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listWebDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listWebDataStreamsTest2() throws Exception { + WebDataStream responsesElement = WebDataStream.newBuilder().build(); + ListWebDataStreamsResponse expectedResponse = + ListWebDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllWebDataStreams(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListWebDataStreamsPagedResponse pagedListResponse = client.listWebDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getWebDataStreamsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListWebDataStreamsRequest actualRequest = ((ListWebDataStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listWebDataStreamsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; client.listWebDataStreams(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. + } + } + + @Test + public void getIosAppDataStreamTest() throws Exception { + IosAppDataStream expectedResponse = + IosAppDataStream.newBuilder() + .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBundleId("bundleId-1294655171") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); + + IosAppDataStream actualResponse = client.getIosAppDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIosAppDataStreamRequest actualRequest = ((GetIosAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIosAppDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); + client.getIosAppDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIosAppDataStreamTest2() throws Exception { + IosAppDataStream expectedResponse = + IosAppDataStream.newBuilder() + .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBundleId("bundleId-1294655171") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + IosAppDataStream actualResponse = client.getIosAppDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIosAppDataStreamRequest actualRequest = ((GetIosAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIosAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; + client.getIosAppDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getIosAppDataStreamTest() { - IosAppDataStreamName name2 = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String bundleId = "bundleId-1479583240"; - String displayName = "displayName1615086568"; - IosAppDataStream expectedResponse = - IosAppDataStream.newBuilder() - .setName(name2.toString()) - .setFirebaseAppId(firebaseAppId) - .setBundleId(bundleId) - .setDisplayName(displayName) - .build(); + public void deleteIosAppDataStreamTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - IosAppDataStream actualResponse = client.getIosAppDataStream(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteIosAppDataStream(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetIosAppDataStreamRequest actualRequest = (GetIosAppDataStreamRequest) actualRequests.get(0); + DeleteIosAppDataStreamRequest actualRequest = + ((DeleteIosAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, IosAppDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1347,37 +1946,34 @@ public void getIosAppDataStreamTest() { } @Test - @SuppressWarnings("all") - public void getIosAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void deleteIosAppDataStreamExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - - client.getIosAppDataStream(name); + client.deleteIosAppDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteIosAppDataStreamTest() { + public void deleteIosAppDataStreamTest2() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); - IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); + String name = "name3373707"; client.deleteIosAppDataStream(name); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteIosAppDataStreamRequest actualRequest = - (DeleteIosAppDataStreamRequest) actualRequests.get(0); + ((DeleteIosAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, IosAppDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1385,34 +1981,29 @@ public void deleteIosAppDataStreamTest() { } @Test - @SuppressWarnings("all") - public void deleteIosAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void deleteIosAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - + String name = "name3373707"; client.deleteIosAppDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateIosAppDataStreamTest() { - IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String bundleId = "bundleId-1479583240"; - String displayName = "displayName1615086568"; + public void updateIosAppDataStreamTest() throws Exception { IosAppDataStream expectedResponse = IosAppDataStream.newBuilder() - .setName(name.toString()) - .setFirebaseAppId(firebaseAppId) - .setBundleId(bundleId) - .setDisplayName(displayName) + .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBundleId("bundleId-1294655171") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1425,7 +2016,7 @@ public void updateIosAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); UpdateIosAppDataStreamRequest actualRequest = - (UpdateIosAppDataStreamRequest) actualRequests.get(0); + ((UpdateIosAppDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(iosAppDataStream, actualRequest.getIosAppDataStream()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -1436,35 +2027,30 @@ public void updateIosAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void updateIosAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateIosAppDataStream(iosAppDataStream, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createIosAppDataStreamTest() { - IosAppDataStreamName name = IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String bundleId = "bundleId-1479583240"; - String displayName = "displayName1615086568"; + public void createIosAppDataStreamTest() throws Exception { IosAppDataStream expectedResponse = IosAppDataStream.newBuilder() - .setName(name.toString()) - .setFirebaseAppId(firebaseAppId) - .setBundleId(bundleId) - .setDisplayName(displayName) + .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBundleId("bundleId-1294655171") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1477,9 +2063,9 @@ public void createIosAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CreateIosAppDataStreamRequest actualRequest = - (CreateIosAppDataStreamRequest) actualRequests.get(0); + ((CreateIosAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(iosAppDataStream, actualRequest.getIosAppDataStream()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -1488,32 +2074,74 @@ public void createIosAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void createIosAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); + client.createIosAppDataStream(parent, iosAppDataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIosAppDataStreamTest2() throws Exception { + IosAppDataStream expectedResponse = + IosAppDataStream.newBuilder() + .setName(IosAppDataStreamName.of("[PROPERTY]", "[IOS_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setBundleId("bundleId-1294655171") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); + + IosAppDataStream actualResponse = client.createIosAppDataStream(parent, iosAppDataStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIosAppDataStreamRequest actualRequest = + ((CreateIosAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(iosAppDataStream, actualRequest.getIosAppDataStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIosAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String parent = "parent-995424086"; + IosAppDataStream iosAppDataStream = IosAppDataStream.newBuilder().build(); client.createIosAppDataStream(parent, iosAppDataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listIosAppDataStreamsTest() { - String nextPageToken = ""; - IosAppDataStream iosAppDataStreamsElement = IosAppDataStream.newBuilder().build(); - List iosAppDataStreams = Arrays.asList(iosAppDataStreamsElement); + public void listIosAppDataStreamsTest() throws Exception { + IosAppDataStream responsesElement = IosAppDataStream.newBuilder().build(); ListIosAppDataStreamsResponse expectedResponse = ListIosAppDataStreamsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllIosAppDataStreams(iosAppDataStreams) + .setNextPageToken("") + .addAllIosAppDataStreams(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1522,15 +2150,16 @@ public void listIosAppDataStreamsTest() { ListIosAppDataStreamsPagedResponse pagedListResponse = client.listIosAppDataStreams(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getIosAppDataStreamsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListIosAppDataStreamsRequest actualRequest = - (ListIosAppDataStreamsRequest) actualRequests.get(0); + ((ListIosAppDataStreamsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1538,35 +2167,75 @@ public void listIosAppDataStreamsTest() { } @Test - @SuppressWarnings("all") public void listIosAppDataStreamsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listIosAppDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIosAppDataStreamsTest2() throws Exception { + IosAppDataStream responsesElement = IosAppDataStream.newBuilder().build(); + ListIosAppDataStreamsResponse expectedResponse = + ListIosAppDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllIosAppDataStreams(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListIosAppDataStreamsPagedResponse pagedListResponse = client.listIosAppDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIosAppDataStreamsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIosAppDataStreamsRequest actualRequest = + ((ListIosAppDataStreamsRequest) actualRequests.get(0)); + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIosAppDataStreamsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; client.listIosAppDataStreams(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getAndroidAppDataStreamTest() { - AndroidAppDataStreamName name2 = - AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String packageName = "packageName-1877165340"; - String displayName = "displayName1615086568"; + public void getAndroidAppDataStreamTest() throws Exception { AndroidAppDataStream expectedResponse = AndroidAppDataStream.newBuilder() - .setName(name2.toString()) - .setFirebaseAppId(firebaseAppId) - .setPackageName(packageName) - .setDisplayName(displayName) + .setName( + AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1579,9 +2248,9 @@ public void getAndroidAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetAndroidAppDataStreamRequest actualRequest = - (GetAndroidAppDataStreamRequest) actualRequests.get(0); + ((GetAndroidAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, AndroidAppDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1589,25 +2258,67 @@ public void getAndroidAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void getAndroidAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); + client.getAndroidAppDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test + public void getAndroidAppDataStreamTest2() throws Exception { + AndroidAppDataStream expectedResponse = + AndroidAppDataStream.newBuilder() + .setName( + AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + AndroidAppDataStream actualResponse = client.getAndroidAppDataStream(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAndroidAppDataStreamRequest actualRequest = + ((GetAndroidAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAndroidAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getAndroidAppDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteAndroidAppDataStreamTest() { + public void deleteAndroidAppDataStreamTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1619,9 +2330,9 @@ public void deleteAndroidAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); DeleteAndroidAppDataStreamRequest actualRequest = - (DeleteAndroidAppDataStreamRequest) actualRequests.get(0); + ((DeleteAndroidAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(name, AndroidAppDataStreamName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1629,36 +2340,66 @@ public void deleteAndroidAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void deleteAndroidAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AndroidAppDataStreamName name = AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); + client.deleteAndroidAppDataStream(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAndroidAppDataStreamTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAndroidAppDataStream(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAndroidAppDataStreamRequest actualRequest = + ((DeleteAndroidAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAndroidAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String name = "name3373707"; client.deleteAndroidAppDataStream(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateAndroidAppDataStreamTest() { - AndroidAppDataStreamName name = - AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String packageName = "packageName-1877165340"; - String displayName = "displayName1615086568"; + public void updateAndroidAppDataStreamTest() throws Exception { AndroidAppDataStream expectedResponse = AndroidAppDataStream.newBuilder() - .setName(name.toString()) - .setFirebaseAppId(firebaseAppId) - .setPackageName(packageName) - .setDisplayName(displayName) + .setName( + AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1672,7 +2413,7 @@ public void updateAndroidAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); UpdateAndroidAppDataStreamRequest actualRequest = - (UpdateAndroidAppDataStreamRequest) actualRequests.get(0); + ((UpdateAndroidAppDataStreamRequest) actualRequests.get(0)); Assert.assertEquals(androidAppDataStream, actualRequest.getAndroidAppDataStream()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -1683,36 +2424,31 @@ public void updateAndroidAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void updateAndroidAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateAndroidAppDataStream(androidAppDataStream, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createAndroidAppDataStreamTest() { - AndroidAppDataStreamName name = - AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]"); - String firebaseAppId = "firebaseAppId605863217"; - String packageName = "packageName-1877165340"; - String displayName = "displayName1615086568"; + public void createAndroidAppDataStreamTest() throws Exception { AndroidAppDataStream expectedResponse = AndroidAppDataStream.newBuilder() - .setName(name.toString()) - .setFirebaseAppId(firebaseAppId) - .setPackageName(packageName) - .setDisplayName(displayName) + .setName( + AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setDisplayName("displayName1714148973") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1726,9 +2462,9 @@ public void createAndroidAppDataStreamTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); CreateAndroidAppDataStreamRequest actualRequest = - (CreateAndroidAppDataStreamRequest) actualRequests.get(0); + ((CreateAndroidAppDataStreamRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(androidAppDataStream, actualRequest.getAndroidAppDataStream()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -1737,32 +2473,76 @@ public void createAndroidAppDataStreamTest() { } @Test - @SuppressWarnings("all") public void createAndroidAppDataStreamExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); + client.createAndroidAppDataStream(parent, androidAppDataStream); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAndroidAppDataStreamTest2() throws Exception { + AndroidAppDataStream expectedResponse = + AndroidAppDataStream.newBuilder() + .setName( + AndroidAppDataStreamName.of("[PROPERTY]", "[ANDROID_APP_DATA_STREAM]").toString()) + .setFirebaseAppId("firebaseAppId1895156053") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPackageName("packageName908759025") + .setDisplayName("displayName1714148973") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); + + AndroidAppDataStream actualResponse = + client.createAndroidAppDataStream(parent, androidAppDataStream); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAndroidAppDataStreamRequest actualRequest = + ((CreateAndroidAppDataStreamRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(androidAppDataStream, actualRequest.getAndroidAppDataStream()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void createAndroidAppDataStreamExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + AndroidAppDataStream androidAppDataStream = AndroidAppDataStream.newBuilder().build(); client.createAndroidAppDataStream(parent, androidAppDataStream); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listAndroidAppDataStreamsTest() { - String nextPageToken = ""; - AndroidAppDataStream androidAppDataStreamsElement = AndroidAppDataStream.newBuilder().build(); - List androidAppDataStreams = Arrays.asList(androidAppDataStreamsElement); + public void listAndroidAppDataStreamsTest() throws Exception { + AndroidAppDataStream responsesElement = AndroidAppDataStream.newBuilder().build(); ListAndroidAppDataStreamsResponse expectedResponse = ListAndroidAppDataStreamsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllAndroidAppDataStreams(androidAppDataStreams) + .setNextPageToken("") + .addAllAndroidAppDataStreams(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1772,15 +2552,16 @@ public void listAndroidAppDataStreamsTest() { client.listAndroidAppDataStreams(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getAndroidAppDataStreamsList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); ListAndroidAppDataStreamsRequest actualRequest = - (ListAndroidAppDataStreamsRequest) actualRequests.get(0); + ((ListAndroidAppDataStreamsRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1788,68 +2569,151 @@ public void listAndroidAppDataStreamsTest() { } @Test - @SuppressWarnings("all") public void listAndroidAppDataStreamsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listAndroidAppDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAndroidAppDataStreamsTest2() throws Exception { + AndroidAppDataStream responsesElement = AndroidAppDataStream.newBuilder().build(); + ListAndroidAppDataStreamsResponse expectedResponse = + ListAndroidAppDataStreamsResponse.newBuilder() + .setNextPageToken("") + .addAllAndroidAppDataStreams(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAndroidAppDataStreamsPagedResponse pagedListResponse = + client.listAndroidAppDataStreams(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAndroidAppDataStreamsList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAndroidAppDataStreamsRequest actualRequest = + ((ListAndroidAppDataStreamsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAndroidAppDataStreamsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAndroidAppDataStreams(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEnhancedMeasurementSettingsTest() throws Exception { + EnhancedMeasurementSettings expectedResponse = + EnhancedMeasurementSettings.newBuilder() + .setName( + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setPageViewsEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setContentViewsEnabled(true) + .setSiteSearchEnabled(true) + .setFormInteractionsEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setDataTaggedElementClicksEnabled(true) + .setPageLoadsEnabled(true) + .setPageChangesEnabled(true) + .setArticlesAndBlogsEnabled(true) + .setProductsAndEcommerceEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUrlQueryParameter("urlQueryParameter1808531216") + .setExcludedDomains("excludedDomains739198725") + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + + EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEnhancedMeasurementSettingsRequest actualRequest = + ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - PropertyName parent = PropertyName.of("[PROPERTY]"); - - client.listAndroidAppDataStreams(parent); + EnhancedMeasurementSettingsName name = + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getEnhancedMeasurementSettingsTest() { - EnhancedMeasurementSettingsName name2 = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - boolean streamEnabled = true; - boolean pageViewsEnabled = true; - boolean scrollsEnabled = true; - boolean outboundClicksEnabled = true; - boolean contentViewsEnabled = true; - boolean siteSearchEnabled = true; - boolean formInteractionsEnabled = true; - boolean videoEngagementEnabled = false; - boolean fileDownloadsEnabled = true; - boolean dataTaggedElementClicksEnabled = true; - boolean pageLoadsEnabled = false; - boolean pageChangesEnabled = false; - boolean articlesAndBlogsEnabled = false; - boolean productsAndEcommerceEnabled = false; - String searchQueryParameter = "searchQueryParameter638048347"; - String urlQueryParameter = "urlQueryParameter729598498"; - String excludedDomains = "excludedDomains147054266"; + public void getEnhancedMeasurementSettingsTest2() throws Exception { EnhancedMeasurementSettings expectedResponse = EnhancedMeasurementSettings.newBuilder() - .setName(name2.toString()) - .setStreamEnabled(streamEnabled) - .setPageViewsEnabled(pageViewsEnabled) - .setScrollsEnabled(scrollsEnabled) - .setOutboundClicksEnabled(outboundClicksEnabled) - .setContentViewsEnabled(contentViewsEnabled) - .setSiteSearchEnabled(siteSearchEnabled) - .setFormInteractionsEnabled(formInteractionsEnabled) - .setVideoEngagementEnabled(videoEngagementEnabled) - .setFileDownloadsEnabled(fileDownloadsEnabled) - .setDataTaggedElementClicksEnabled(dataTaggedElementClicksEnabled) - .setPageLoadsEnabled(pageLoadsEnabled) - .setPageChangesEnabled(pageChangesEnabled) - .setArticlesAndBlogsEnabled(articlesAndBlogsEnabled) - .setProductsAndEcommerceEnabled(productsAndEcommerceEnabled) - .setSearchQueryParameter(searchQueryParameter) - .setUrlQueryParameter(urlQueryParameter) - .setExcludedDomains(excludedDomains) + .setName( + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setPageViewsEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setContentViewsEnabled(true) + .setSiteSearchEnabled(true) + .setFormInteractionsEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setDataTaggedElementClicksEnabled(true) + .setPageLoadsEnabled(true) + .setPageChangesEnabled(true) + .setArticlesAndBlogsEnabled(true) + .setProductsAndEcommerceEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUrlQueryParameter("urlQueryParameter1808531216") + .setExcludedDomains("excludedDomains739198725") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); + String name = "name3373707"; EnhancedMeasurementSettings actualResponse = client.getEnhancedMeasurementSettings(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -1857,9 +2721,9 @@ public void getEnhancedMeasurementSettingsTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetEnhancedMeasurementSettingsRequest actualRequest = - (GetEnhancedMeasurementSettingsRequest) actualRequests.get(0); + ((GetEnhancedMeasurementSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, EnhancedMeasurementSettingsName.parse(actualRequest.getName())); + Assert.assertEquals(name, actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -1867,64 +2731,42 @@ public void getEnhancedMeasurementSettingsTest() { } @Test - @SuppressWarnings("all") - public void getEnhancedMeasurementSettingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + public void getEnhancedMeasurementSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - + String name = "name3373707"; client.getEnhancedMeasurementSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateEnhancedMeasurementSettingsTest() { - EnhancedMeasurementSettingsName name = - EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]"); - boolean streamEnabled = true; - boolean pageViewsEnabled = true; - boolean scrollsEnabled = true; - boolean outboundClicksEnabled = true; - boolean contentViewsEnabled = true; - boolean siteSearchEnabled = true; - boolean formInteractionsEnabled = true; - boolean videoEngagementEnabled = false; - boolean fileDownloadsEnabled = true; - boolean dataTaggedElementClicksEnabled = true; - boolean pageLoadsEnabled = false; - boolean pageChangesEnabled = false; - boolean articlesAndBlogsEnabled = false; - boolean productsAndEcommerceEnabled = false; - String searchQueryParameter = "searchQueryParameter638048347"; - String urlQueryParameter = "urlQueryParameter729598498"; - String excludedDomains = "excludedDomains147054266"; + public void updateEnhancedMeasurementSettingsTest() throws Exception { EnhancedMeasurementSettings expectedResponse = EnhancedMeasurementSettings.newBuilder() - .setName(name.toString()) - .setStreamEnabled(streamEnabled) - .setPageViewsEnabled(pageViewsEnabled) - .setScrollsEnabled(scrollsEnabled) - .setOutboundClicksEnabled(outboundClicksEnabled) - .setContentViewsEnabled(contentViewsEnabled) - .setSiteSearchEnabled(siteSearchEnabled) - .setFormInteractionsEnabled(formInteractionsEnabled) - .setVideoEngagementEnabled(videoEngagementEnabled) - .setFileDownloadsEnabled(fileDownloadsEnabled) - .setDataTaggedElementClicksEnabled(dataTaggedElementClicksEnabled) - .setPageLoadsEnabled(pageLoadsEnabled) - .setPageChangesEnabled(pageChangesEnabled) - .setArticlesAndBlogsEnabled(articlesAndBlogsEnabled) - .setProductsAndEcommerceEnabled(productsAndEcommerceEnabled) - .setSearchQueryParameter(searchQueryParameter) - .setUrlQueryParameter(urlQueryParameter) - .setExcludedDomains(excludedDomains) + .setName( + EnhancedMeasurementSettingsName.of("[PROPERTY]", "[WEB_DATA_STREAM]").toString()) + .setStreamEnabled(true) + .setPageViewsEnabled(true) + .setScrollsEnabled(true) + .setOutboundClicksEnabled(true) + .setContentViewsEnabled(true) + .setSiteSearchEnabled(true) + .setFormInteractionsEnabled(true) + .setVideoEngagementEnabled(true) + .setFileDownloadsEnabled(true) + .setDataTaggedElementClicksEnabled(true) + .setPageLoadsEnabled(true) + .setPageChangesEnabled(true) + .setArticlesAndBlogsEnabled(true) + .setProductsAndEcommerceEnabled(true) + .setSearchQueryParameter("searchQueryParameter-2012788855") + .setUrlQueryParameter("urlQueryParameter1808531216") + .setExcludedDomains("excludedDomains739198725") .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -1939,7 +2781,7 @@ public void updateEnhancedMeasurementSettingsTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); UpdateEnhancedMeasurementSettingsRequest actualRequest = - (UpdateEnhancedMeasurementSettingsRequest) actualRequests.get(0); + ((UpdateEnhancedMeasurementSettingsRequest) actualRequests.get(0)); Assert.assertEquals( enhancedMeasurementSettings, actualRequest.getEnhancedMeasurementSettings()); @@ -1951,30 +2793,29 @@ public void updateEnhancedMeasurementSettingsTest() { } @Test - @SuppressWarnings("all") public void updateEnhancedMeasurementSettingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { EnhancedMeasurementSettings enhancedMeasurementSettings = EnhancedMeasurementSettings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateEnhancedMeasurementSettings(enhancedMeasurementSettings, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createFirebaseLinkTest() { - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - String project = "project-309310695"; + public void createFirebaseLinkTest() throws Exception { FirebaseLink expectedResponse = - FirebaseLink.newBuilder().setName(name.toString()).setProject(project).build(); + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); @@ -1985,9 +2826,9 @@ public void createFirebaseLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateFirebaseLinkRequest actualRequest = (CreateFirebaseLinkRequest) actualRequests.get(0); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -1996,29 +2837,71 @@ public void createFirebaseLinkTest() { } @Test - @SuppressWarnings("all") public void createFirebaseLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + client.createFirebaseLink(parent, firebaseLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createFirebaseLinkTest2() throws Exception { + FirebaseLink expectedResponse = + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); + + FirebaseLink actualResponse = client.createFirebaseLink(parent, firebaseLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateFirebaseLinkRequest actualRequest = ((CreateFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void createFirebaseLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); client.createFirebaseLink(parent, firebaseLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateFirebaseLinkTest() { - FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); - String project = "project-309310695"; + public void updateFirebaseLinkTest() throws Exception { FirebaseLink expectedResponse = - FirebaseLink.newBuilder().setName(name.toString()).setProject(project).build(); + FirebaseLink.newBuilder() + .setName(FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]").toString()) + .setProject("project-309310695") + .setCreateTime(Timestamp.newBuilder().build()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); @@ -2029,7 +2912,7 @@ public void updateFirebaseLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateFirebaseLinkRequest actualRequest = (UpdateFirebaseLinkRequest) actualRequests.get(0); + UpdateFirebaseLinkRequest actualRequest = ((UpdateFirebaseLinkRequest) actualRequests.get(0)); Assert.assertEquals(firebaseLink, actualRequest.getFirebaseLink()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -2040,25 +2923,22 @@ public void updateFirebaseLinkTest() { } @Test - @SuppressWarnings("all") public void updateFirebaseLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { FirebaseLink firebaseLink = FirebaseLink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateFirebaseLink(firebaseLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteFirebaseLinkTest() { + public void deleteFirebaseLinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2068,9 +2948,9 @@ public void deleteFirebaseLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteFirebaseLinkRequest actualRequest = (DeleteFirebaseLinkRequest) actualRequests.get(0); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, FirebaseLinkName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2078,25 +2958,59 @@ public void deleteFirebaseLinkTest() { } @Test - @SuppressWarnings("all") public void deleteFirebaseLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { FirebaseLinkName name = FirebaseLinkName.of("[PROPERTY]", "[FIREBASE_LINK]"); + client.deleteFirebaseLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteFirebaseLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteFirebaseLink(name); + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteFirebaseLinkRequest actualRequest = ((DeleteFirebaseLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteFirebaseLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.deleteFirebaseLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listFirebaseLinksTest() { - ListFirebaseLinksResponse expectedResponse = ListFirebaseLinksResponse.newBuilder().build(); + public void listFirebaseLinksTest() throws Exception { + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .addAllFirebaseLinks(new ArrayList()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); PropertyName parent = PropertyName.of("[PROPERTY]"); @@ -2106,9 +3020,9 @@ public void listFirebaseLinksTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListFirebaseLinksRequest actualRequest = (ListFirebaseLinksRequest) actualRequests.get(0); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2116,26 +3030,64 @@ public void listFirebaseLinksTest() { } @Test - @SuppressWarnings("all") public void listFirebaseLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listFirebaseLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listFirebaseLinksTest2() throws Exception { + ListFirebaseLinksResponse expectedResponse = + ListFirebaseLinksResponse.newBuilder() + .addAllFirebaseLinks(new ArrayList()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListFirebaseLinksResponse actualResponse = client.listFirebaseLinks(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListFirebaseLinksRequest actualRequest = ((ListFirebaseLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listFirebaseLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String parent = "parent-995424086"; client.listFirebaseLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getGlobalSiteTagTest() { - String snippet = "snippet-2061635299"; - GlobalSiteTag expectedResponse = GlobalSiteTag.newBuilder().setSnippet(snippet).build(); + public void getGlobalSiteTagTest() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setSnippet("snippet-2061635299") + .setName(GlobalSiteTagName.of("[PROPERTY]").toString()) + .build(); mockAnalyticsAdminService.addResponse(expectedResponse); GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]"); @@ -2145,9 +3097,9 @@ public void getGlobalSiteTagTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetGlobalSiteTagRequest actualRequest = (GetGlobalSiteTagRequest) actualRequests.get(0); + GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); - Assert.assertEquals(name, GlobalSiteTagName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2155,36 +3107,70 @@ public void getGlobalSiteTagTest() { } @Test - @SuppressWarnings("all") public void getGlobalSiteTagExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { GlobalSiteTagName name = GlobalSiteTagName.of("[PROPERTY]"); + client.getGlobalSiteTag(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getGlobalSiteTagTest2() throws Exception { + GlobalSiteTag expectedResponse = + GlobalSiteTag.newBuilder() + .setSnippet("snippet-2061635299") + .setName(GlobalSiteTagName.of("[PROPERTY]").toString()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + GlobalSiteTag actualResponse = client.getGlobalSiteTag(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetGlobalSiteTagRequest actualRequest = ((GetGlobalSiteTagRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getGlobalSiteTagExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getGlobalSiteTag(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void createGoogleAdsLinkTest() { - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); - String parent2 = "parent21175163357"; - String customerId = "customerId-1772061412"; - boolean canManageClients = false; - String emailAddress = "emailAddress-769510831"; + public void createGoogleAdsLinkTest() throws Exception { GoogleAdsLink expectedResponse = GoogleAdsLink.newBuilder() - .setName(name.toString()) - .setParent(parent2) - .setCustomerId(customerId) - .setCanManageClients(canManageClients) - .setEmailAddress(emailAddress) + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setParent("parent-995424086") + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setEmailAddress("emailAddress-1070931784") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2196,9 +3182,9 @@ public void createGoogleAdsLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateGoogleAdsLinkRequest actualRequest = (CreateGoogleAdsLinkRequest) actualRequests.get(0); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -2207,37 +3193,80 @@ public void createGoogleAdsLinkTest() { } @Test - @SuppressWarnings("all") public void createGoogleAdsLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); - client.createGoogleAdsLink(parent, googleAdsLink); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void updateGoogleAdsLinkTest() { - GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + public void createGoogleAdsLinkTest2() throws Exception { + GoogleAdsLink expectedResponse = + GoogleAdsLink.newBuilder() + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setParent("parent-995424086") + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setEmailAddress("emailAddress-1070931784") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + String parent = "parent-995424086"; - String customerId = "customerId-1772061412"; - boolean canManageClients = false; - String emailAddress = "emailAddress-769510831"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + + GoogleAdsLink actualResponse = client.createGoogleAdsLink(parent, googleAdsLink); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateGoogleAdsLinkRequest actualRequest = ((CreateGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createGoogleAdsLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String parent = "parent-995424086"; + GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); + client.createGoogleAdsLink(parent, googleAdsLink); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateGoogleAdsLinkTest() throws Exception { GoogleAdsLink expectedResponse = GoogleAdsLink.newBuilder() - .setName(name.toString()) - .setParent(parent) - .setCustomerId(customerId) - .setCanManageClients(canManageClients) - .setEmailAddress(emailAddress) + .setName(GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]").toString()) + .setParent("parent-995424086") + .setCustomerId("customerId-1581184615") + .setCanManageClients(true) + .setAdsPersonalizationEnabled(BoolValue.newBuilder().build()) + .setEmailAddress("emailAddress-1070931784") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2249,7 +3278,7 @@ public void updateGoogleAdsLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateGoogleAdsLinkRequest actualRequest = (UpdateGoogleAdsLinkRequest) actualRequests.get(0); + UpdateGoogleAdsLinkRequest actualRequest = ((UpdateGoogleAdsLinkRequest) actualRequests.get(0)); Assert.assertEquals(googleAdsLink, actualRequest.getGoogleAdsLink()); Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); @@ -2260,25 +3289,22 @@ public void updateGoogleAdsLinkTest() { } @Test - @SuppressWarnings("all") public void updateGoogleAdsLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { GoogleAdsLink googleAdsLink = GoogleAdsLink.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateGoogleAdsLink(googleAdsLink, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void deleteGoogleAdsLinkTest() { + public void deleteGoogleAdsLinkTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2288,9 +3314,9 @@ public void deleteGoogleAdsLinkTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteGoogleAdsLinkRequest actualRequest = (DeleteGoogleAdsLinkRequest) actualRequests.get(0); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); - Assert.assertEquals(name, GoogleAdsLinkName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2298,31 +3324,60 @@ public void deleteGoogleAdsLinkTest() { } @Test - @SuppressWarnings("all") public void deleteGoogleAdsLinkExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { GoogleAdsLinkName name = GoogleAdsLinkName.of("[PROPERTY]", "[GOOGLE_ADS_LINK]"); + client.deleteGoogleAdsLink(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteGoogleAdsLinkTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteGoogleAdsLink(name); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteGoogleAdsLinkRequest actualRequest = ((DeleteGoogleAdsLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteGoogleAdsLinkExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String name = "name3373707"; client.deleteGoogleAdsLink(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void listGoogleAdsLinksTest() { - String nextPageToken = ""; - GoogleAdsLink googleAdsLinksElement = GoogleAdsLink.newBuilder().build(); - List googleAdsLinks = Arrays.asList(googleAdsLinksElement); + public void listGoogleAdsLinksTest() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); ListGoogleAdsLinksResponse expectedResponse = ListGoogleAdsLinksResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllGoogleAdsLinks(googleAdsLinks) + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2331,14 +3386,15 @@ public void listGoogleAdsLinksTest() { ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListGoogleAdsLinksRequest actualRequest = (ListGoogleAdsLinksRequest) actualRequests.get(0); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); - Assert.assertEquals(parent, PropertyName.parse(actualRequest.getParent())); + Assert.assertEquals(parent.toString(), actualRequest.getParent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2346,38 +3402,73 @@ public void listGoogleAdsLinksTest() { } @Test - @SuppressWarnings("all") public void listGoogleAdsLinksExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { PropertyName parent = PropertyName.of("[PROPERTY]"); + client.listGoogleAdsLinks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listGoogleAdsLinksTest2() throws Exception { + GoogleAdsLink responsesElement = GoogleAdsLink.newBuilder().build(); + ListGoogleAdsLinksResponse expectedResponse = + ListGoogleAdsLinksResponse.newBuilder() + .setNextPageToken("") + .addAllGoogleAdsLinks(Arrays.asList(responsesElement)) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListGoogleAdsLinksPagedResponse pagedListResponse = client.listGoogleAdsLinks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getGoogleAdsLinksList().get(0), resources.get(0)); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListGoogleAdsLinksRequest actualRequest = ((ListGoogleAdsLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listGoogleAdsLinksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + try { + String parent = "parent-995424086"; client.listGoogleAdsLinks(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } @Test - @SuppressWarnings("all") - public void getDataSharingSettingsTest() { - DataSharingSettingsName name2 = DataSharingSettingsName.of("[ACCOUNT]"); - boolean sharingWithGoogleSupportEnabled = false; - boolean sharingWithGoogleAssignedSalesEnabled = false; - boolean sharingWithGoogleAnySalesEnabled = false; - boolean sharingWithGoogleProductsEnabled = true; - boolean sharingWithOthersEnabled = false; + public void getDataSharingSettingsTest() throws Exception { DataSharingSettings expectedResponse = DataSharingSettings.newBuilder() - .setName(name2.toString()) - .setSharingWithGoogleSupportEnabled(sharingWithGoogleSupportEnabled) - .setSharingWithGoogleAssignedSalesEnabled(sharingWithGoogleAssignedSalesEnabled) - .setSharingWithGoogleAnySalesEnabled(sharingWithGoogleAnySalesEnabled) - .setSharingWithGoogleProductsEnabled(sharingWithGoogleProductsEnabled) - .setSharingWithOthersEnabled(sharingWithOthersEnabled) + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) .build(); mockAnalyticsAdminService.addResponse(expectedResponse); @@ -2389,9 +3480,9 @@ public void getDataSharingSettingsTest() { List actualRequests = mockAnalyticsAdminService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetDataSharingSettingsRequest actualRequest = - (GetDataSharingSettingsRequest) actualRequests.get(0); + ((GetDataSharingSettingsRequest) actualRequests.get(0)); - Assert.assertEquals(name, DataSharingSettingsName.parse(actualRequest.getName())); + Assert.assertEquals(name.toString(), actualRequest.getName()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -2399,18 +3490,60 @@ public void getDataSharingSettingsTest() { } @Test - @SuppressWarnings("all") public void getDataSharingSettingsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); mockAnalyticsAdminService.addException(exception); try { DataSharingSettingsName name = DataSharingSettingsName.of("[ACCOUNT]"); + client.getDataSharingSettings(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataSharingSettingsTest2() throws Exception { + DataSharingSettings expectedResponse = + DataSharingSettings.newBuilder() + .setName(DataSharingSettingsName.of("[ACCOUNT]").toString()) + .setSharingWithGoogleSupportEnabled(true) + .setSharingWithGoogleAssignedSalesEnabled(true) + .setSharingWithGoogleAnySalesEnabled(true) + .setSharingWithGoogleProductsEnabled(true) + .setSharingWithOthersEnabled(true) + .build(); + mockAnalyticsAdminService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataSharingSettings actualResponse = client.getDataSharingSettings(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAnalyticsAdminService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSharingSettingsRequest actualRequest = + ((GetDataSharingSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + @Test + public void getDataSharingSettingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAnalyticsAdminService.addException(exception); + + try { + String name = "name3373707"; client.getDataSharingSettings(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { - // Expected exception + // Expected exception. } } } diff --git a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminService.java b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminService.java index 3e48974a..dfb12185 100644 --- a/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminService.java +++ b/google-analytics-admin/src/test/java/com/google/analytics/admin/v1alpha/MockAnalyticsAdminService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha; import com.google.api.core.BetaApi; @@ -20,9 +21,10 @@ import com.google.protobuf.AbstractMessage; import io.grpc.ServerServiceDefinition; import java.util.List; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockAnalyticsAdminService implements MockGrpcService { private final MockAnalyticsAdminServiceImpl serviceImpl; 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 4dbafa2f..f8bbdba0 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 @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.google.analytics.admin.v1alpha; import com.google.analytics.admin.v1alpha.AnalyticsAdminServiceGrpc.AnalyticsAdminServiceImplBase; @@ -24,9 +25,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Queue; +import javax.annotation.Generated; -@javax.annotation.Generated("by GAPIC") @BetaApi +@Generated("by gapic-generator-java") public class MockAnalyticsAdminServiceImpl extends AnalyticsAdminServiceImplBase { private List requests; private Queue responses; @@ -62,10 +64,10 @@ public void getAccount(GetAccountRequest request, StreamObserver respon Object response = responses.remove(); if (response instanceof Account) { requests.add(request); - responseObserver.onNext((Account) response); + responseObserver.onNext(((Account) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -77,10 +79,10 @@ public void listAccounts( Object response = responses.remove(); if (response instanceof ListAccountsResponse) { requests.add(request); - responseObserver.onNext((ListAccountsResponse) response); + responseObserver.onNext(((ListAccountsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -91,10 +93,10 @@ public void deleteAccount(DeleteAccountRequest request, StreamObserver re Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -106,10 +108,10 @@ public void updateAccount( Object response = responses.remove(); if (response instanceof Account) { requests.add(request); - responseObserver.onNext((Account) response); + responseObserver.onNext(((Account) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -122,10 +124,10 @@ public void provisionAccountTicket( Object response = responses.remove(); if (response instanceof ProvisionAccountTicketResponse) { requests.add(request); - responseObserver.onNext((ProvisionAccountTicketResponse) response); + responseObserver.onNext(((ProvisionAccountTicketResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -138,10 +140,10 @@ public void listAccountSummaries( Object response = responses.remove(); if (response instanceof ListAccountSummariesResponse) { requests.add(request); - responseObserver.onNext((ListAccountSummariesResponse) response); + responseObserver.onNext(((ListAccountSummariesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -152,10 +154,10 @@ public void getProperty(GetPropertyRequest request, StreamObserver res Object response = responses.remove(); if (response instanceof Property) { requests.add(request); - responseObserver.onNext((Property) response); + responseObserver.onNext(((Property) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -167,10 +169,10 @@ public void listProperties( Object response = responses.remove(); if (response instanceof ListPropertiesResponse) { requests.add(request); - responseObserver.onNext((ListPropertiesResponse) response); + responseObserver.onNext(((ListPropertiesResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -182,10 +184,10 @@ public void createProperty( Object response = responses.remove(); if (response instanceof Property) { requests.add(request); - responseObserver.onNext((Property) response); + responseObserver.onNext(((Property) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -197,10 +199,10 @@ public void deleteProperty( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -212,10 +214,10 @@ public void updateProperty( Object response = responses.remove(); if (response instanceof Property) { requests.add(request); - responseObserver.onNext((Property) response); + responseObserver.onNext(((Property) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -226,10 +228,10 @@ public void getUserLink(GetUserLinkRequest request, StreamObserver res Object response = responses.remove(); if (response instanceof UserLink) { requests.add(request); - responseObserver.onNext((UserLink) response); + responseObserver.onNext(((UserLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -242,10 +244,10 @@ public void batchGetUserLinks( Object response = responses.remove(); if (response instanceof BatchGetUserLinksResponse) { requests.add(request); - responseObserver.onNext((BatchGetUserLinksResponse) response); + responseObserver.onNext(((BatchGetUserLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -257,10 +259,10 @@ public void listUserLinks( Object response = responses.remove(); if (response instanceof ListUserLinksResponse) { requests.add(request); - responseObserver.onNext((ListUserLinksResponse) response); + responseObserver.onNext(((ListUserLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -272,10 +274,10 @@ public void auditUserLinks( Object response = responses.remove(); if (response instanceof AuditUserLinksResponse) { requests.add(request); - responseObserver.onNext((AuditUserLinksResponse) response); + responseObserver.onNext(((AuditUserLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -287,10 +289,10 @@ public void createUserLink( Object response = responses.remove(); if (response instanceof UserLink) { requests.add(request); - responseObserver.onNext((UserLink) response); + responseObserver.onNext(((UserLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -303,10 +305,10 @@ public void batchCreateUserLinks( Object response = responses.remove(); if (response instanceof BatchCreateUserLinksResponse) { requests.add(request); - responseObserver.onNext((BatchCreateUserLinksResponse) response); + responseObserver.onNext(((BatchCreateUserLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -318,10 +320,10 @@ public void updateUserLink( Object response = responses.remove(); if (response instanceof UserLink) { requests.add(request); - responseObserver.onNext((UserLink) response); + responseObserver.onNext(((UserLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -334,10 +336,10 @@ public void batchUpdateUserLinks( Object response = responses.remove(); if (response instanceof BatchUpdateUserLinksResponse) { requests.add(request); - responseObserver.onNext((BatchUpdateUserLinksResponse) response); + responseObserver.onNext(((BatchUpdateUserLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -349,10 +351,10 @@ public void deleteUserLink( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -364,10 +366,10 @@ public void batchDeleteUserLinks( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -379,10 +381,10 @@ public void getWebDataStream( Object response = responses.remove(); if (response instanceof WebDataStream) { requests.add(request); - responseObserver.onNext((WebDataStream) response); + responseObserver.onNext(((WebDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -394,10 +396,10 @@ public void deleteWebDataStream( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -409,10 +411,10 @@ public void updateWebDataStream( Object response = responses.remove(); if (response instanceof WebDataStream) { requests.add(request); - responseObserver.onNext((WebDataStream) response); + responseObserver.onNext(((WebDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -424,10 +426,10 @@ public void createWebDataStream( Object response = responses.remove(); if (response instanceof WebDataStream) { requests.add(request); - responseObserver.onNext((WebDataStream) response); + responseObserver.onNext(((WebDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -440,10 +442,10 @@ public void listWebDataStreams( Object response = responses.remove(); if (response instanceof ListWebDataStreamsResponse) { requests.add(request); - responseObserver.onNext((ListWebDataStreamsResponse) response); + responseObserver.onNext(((ListWebDataStreamsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -455,10 +457,10 @@ public void getIosAppDataStream( Object response = responses.remove(); if (response instanceof IosAppDataStream) { requests.add(request); - responseObserver.onNext((IosAppDataStream) response); + responseObserver.onNext(((IosAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -470,10 +472,10 @@ public void deleteIosAppDataStream( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -485,10 +487,10 @@ public void updateIosAppDataStream( Object response = responses.remove(); if (response instanceof IosAppDataStream) { requests.add(request); - responseObserver.onNext((IosAppDataStream) response); + responseObserver.onNext(((IosAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -500,10 +502,10 @@ public void createIosAppDataStream( Object response = responses.remove(); if (response instanceof IosAppDataStream) { requests.add(request); - responseObserver.onNext((IosAppDataStream) response); + responseObserver.onNext(((IosAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -516,10 +518,10 @@ public void listIosAppDataStreams( Object response = responses.remove(); if (response instanceof ListIosAppDataStreamsResponse) { requests.add(request); - responseObserver.onNext((ListIosAppDataStreamsResponse) response); + responseObserver.onNext(((ListIosAppDataStreamsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -532,10 +534,10 @@ public void getAndroidAppDataStream( Object response = responses.remove(); if (response instanceof AndroidAppDataStream) { requests.add(request); - responseObserver.onNext((AndroidAppDataStream) response); + responseObserver.onNext(((AndroidAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -547,10 +549,10 @@ public void deleteAndroidAppDataStream( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -563,10 +565,10 @@ public void updateAndroidAppDataStream( Object response = responses.remove(); if (response instanceof AndroidAppDataStream) { requests.add(request); - responseObserver.onNext((AndroidAppDataStream) response); + responseObserver.onNext(((AndroidAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -579,10 +581,10 @@ public void createAndroidAppDataStream( Object response = responses.remove(); if (response instanceof AndroidAppDataStream) { requests.add(request); - responseObserver.onNext((AndroidAppDataStream) response); + responseObserver.onNext(((AndroidAppDataStream) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -595,10 +597,10 @@ public void listAndroidAppDataStreams( Object response = responses.remove(); if (response instanceof ListAndroidAppDataStreamsResponse) { requests.add(request); - responseObserver.onNext((ListAndroidAppDataStreamsResponse) response); + responseObserver.onNext(((ListAndroidAppDataStreamsResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -611,10 +613,10 @@ public void getEnhancedMeasurementSettings( Object response = responses.remove(); if (response instanceof EnhancedMeasurementSettings) { requests.add(request); - responseObserver.onNext((EnhancedMeasurementSettings) response); + responseObserver.onNext(((EnhancedMeasurementSettings) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -627,10 +629,10 @@ public void updateEnhancedMeasurementSettings( Object response = responses.remove(); if (response instanceof EnhancedMeasurementSettings) { requests.add(request); - responseObserver.onNext((EnhancedMeasurementSettings) response); + responseObserver.onNext(((EnhancedMeasurementSettings) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -642,10 +644,10 @@ public void createFirebaseLink( Object response = responses.remove(); if (response instanceof FirebaseLink) { requests.add(request); - responseObserver.onNext((FirebaseLink) response); + responseObserver.onNext(((FirebaseLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -657,10 +659,10 @@ public void updateFirebaseLink( Object response = responses.remove(); if (response instanceof FirebaseLink) { requests.add(request); - responseObserver.onNext((FirebaseLink) response); + responseObserver.onNext(((FirebaseLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -672,10 +674,10 @@ public void deleteFirebaseLink( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -688,10 +690,10 @@ public void listFirebaseLinks( Object response = responses.remove(); if (response instanceof ListFirebaseLinksResponse) { requests.add(request); - responseObserver.onNext((ListFirebaseLinksResponse) response); + responseObserver.onNext(((ListFirebaseLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -703,10 +705,10 @@ public void getGlobalSiteTag( Object response = responses.remove(); if (response instanceof GlobalSiteTag) { requests.add(request); - responseObserver.onNext((GlobalSiteTag) response); + responseObserver.onNext(((GlobalSiteTag) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -718,10 +720,10 @@ public void createGoogleAdsLink( Object response = responses.remove(); if (response instanceof GoogleAdsLink) { requests.add(request); - responseObserver.onNext((GoogleAdsLink) response); + responseObserver.onNext(((GoogleAdsLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -733,10 +735,10 @@ public void updateGoogleAdsLink( Object response = responses.remove(); if (response instanceof GoogleAdsLink) { requests.add(request); - responseObserver.onNext((GoogleAdsLink) response); + responseObserver.onNext(((GoogleAdsLink) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -748,10 +750,10 @@ public void deleteGoogleAdsLink( Object response = responses.remove(); if (response instanceof Empty) { requests.add(request); - responseObserver.onNext((Empty) response); + responseObserver.onNext(((Empty) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -764,10 +766,10 @@ public void listGoogleAdsLinks( Object response = responses.remove(); if (response instanceof ListGoogleAdsLinksResponse) { requests.add(request); - responseObserver.onNext((ListGoogleAdsLinksResponse) response); + responseObserver.onNext(((ListGoogleAdsLinksResponse) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } @@ -779,10 +781,10 @@ public void getDataSharingSettings( Object response = responses.remove(); if (response instanceof DataSharingSettings) { requests.add(request); - responseObserver.onNext((DataSharingSettings) response); + responseObserver.onNext(((DataSharingSettings) response)); responseObserver.onCompleted(); } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); + responseObserver.onError(((Exception) response)); } else { responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } diff --git a/grpc-google-analytics-admin-v1alpha/pom.xml b/grpc-google-analytics-admin-v1alpha/pom.xml index 180094e2..564cb714 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.2.3 + 0.2.4 grpc-google-analytics-admin-v1alpha GRPC library for grpc-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.2.3 + 0.2.4 diff --git a/pom.xml b/pom.xml index 737443b2..1a61ca07 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-admin-parent pom - 0.2.3 + 0.2.4 Google Analytics Admin Parent https://github.com/googleapis/java-analytics-admin @@ -70,23 +70,23 @@ com.google.analytics google-analytics-admin - 0.2.3 + 0.2.4 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.2.3 + 0.2.4 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.2.3 + 0.2.4 com.google.cloud google-cloud-shared-dependencies - 0.16.0 + 0.16.1 pom import diff --git a/proto-google-analytics-admin-v1alpha/clirr-ignored-differences.xml b/proto-google-analytics-admin-v1alpha/clirr-ignored-differences.xml new file mode 100644 index 00000000..61e61691 --- /dev/null +++ b/proto-google-analytics-admin-v1alpha/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/analytics/admin/v1alpha/*OrBuilder + * get*(*) + + + 7012 + com/google/analytics/admin/v1alpha/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/analytics/admin/v1alpha/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-analytics-admin-v1alpha/pom.xml b/proto-google-analytics-admin-v1alpha/pom.xml index 1217826d..b894d0e0 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.2.3 + 0.2.4 proto-google-analytics-admin-v1alpha PROTO library for proto-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.2.3 + 0.2.4 diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountName.java index 87238e8e..ccfa5292 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,18 +23,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class AccountName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate ACCOUNT = PathTemplate.createWithoutUrlEncoding("accounts/{account}"); - private volatile Map fieldValuesMap; - private final String account; + @Deprecated + protected AccountName() { + account = null; + } + + private AccountName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + } + public String getAccount() { return account; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private AccountName(Builder builder) { - account = Preconditions.checkNotNull(builder.getAccount()); - } - public static AccountName of(String account) { return newBuilder().setAccount(account).build(); } @@ -64,7 +68,7 @@ public static AccountName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + ACCOUNT.validatedMatch( formattedString, "AccountName.parse: formattedString not in valid format"); return of(matchMap.get("account")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (AccountName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return ACCOUNT.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("account", account); + if (account != null) { + fieldMapBuilder.put("account", account); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("account", account); + return ACCOUNT.instantiate("account", account); } - /** Builder for AccountName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AccountName that = ((AccountName) o); + return Objects.equals(this.account, that.account); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + return h; + } + + /** Builder for accounts/{account}. */ + public static class Builder { private String account; + protected Builder() {} + public String getAccount() { return account; } @@ -129,8 +157,6 @@ public Builder setAccount(String account) { return this; } - private Builder() {} - private Builder(AccountName accountName) { account = accountName.account; } @@ -139,24 +165,4 @@ public AccountName build() { return new AccountName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AccountName) { - AccountName that = (AccountName) o; - return (this.account.equals(that.account)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= account.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java index 59722647..3e560362 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AccountSummaryName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,18 +23,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class AccountSummaryName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate ACCOUNT_SUMMARY = PathTemplate.createWithoutUrlEncoding("accountSummaries/{account_summary}"); - private volatile Map fieldValuesMap; - private final String accountSummary; + @Deprecated + protected AccountSummaryName() { + accountSummary = null; + } + + private AccountSummaryName(Builder builder) { + accountSummary = Preconditions.checkNotNull(builder.getAccountSummary()); + } + public String getAccountSummary() { return accountSummary; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private AccountSummaryName(Builder builder) { - accountSummary = Preconditions.checkNotNull(builder.getAccountSummary()); - } - public static AccountSummaryName of(String accountSummary) { return newBuilder().setAccountSummary(accountSummary).build(); } @@ -64,7 +68,7 @@ public static AccountSummaryName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + ACCOUNT_SUMMARY.validatedMatch( formattedString, "AccountSummaryName.parse: formattedString not in valid format"); return of(matchMap.get("account_summary")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStrings) } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (AccountSummaryName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return ACCOUNT_SUMMARY.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("accountSummary", accountSummary); + if (accountSummary != null) { + fieldMapBuilder.put("account_summary", accountSummary); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("account_summary", accountSummary); + return ACCOUNT_SUMMARY.instantiate("account_summary", accountSummary); } - /** Builder for AccountSummaryName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AccountSummaryName that = ((AccountSummaryName) o); + return Objects.equals(this.accountSummary, that.accountSummary); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(accountSummary); + return h; + } + + /** Builder for accountSummaries/{account_summary}. */ + public static class Builder { private String accountSummary; + protected Builder() {} + public String getAccountSummary() { return accountSummary; } @@ -129,8 +157,6 @@ public Builder setAccountSummary(String accountSummary) { return this; } - private Builder() {} - private Builder(AccountSummaryName accountSummaryName) { accountSummary = accountSummaryName.accountSummary; } @@ -139,24 +165,4 @@ public AccountSummaryName build() { return new AccountSummaryName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AccountSummaryName) { - AccountSummaryName that = (AccountSummaryName) o; - return (this.accountSummary.equals(that.accountSummary)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= accountSummary.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStreamName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStreamName.java index 3ed7510f..cc0b3277 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStreamName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/AndroidAppDataStreamName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,20 +23,30 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class AndroidAppDataStreamName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY_ANDROID_APP_DATA_STREAM = PathTemplate.createWithoutUrlEncoding( "properties/{property}/androidAppDataStreams/{android_app_data_stream}"); - private volatile Map fieldValuesMap; - private final String property; private final String androidAppDataStream; + @Deprecated + protected AndroidAppDataStreamName() { + property = null; + androidAppDataStream = null; + } + + private AndroidAppDataStreamName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + androidAppDataStream = Preconditions.checkNotNull(builder.getAndroidAppDataStream()); + } + public String getProperty() { return property; } @@ -53,11 +63,6 @@ public Builder toBuilder() { return new Builder(this); } - private AndroidAppDataStreamName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - androidAppDataStream = Preconditions.checkNotNull(builder.getAndroidAppDataStream()); - } - public static AndroidAppDataStreamName of(String property, String androidAppDataStream) { return newBuilder().setProperty(property).setAndroidAppDataStream(androidAppDataStream).build(); } @@ -75,7 +80,7 @@ public static AndroidAppDataStreamName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY_ANDROID_APP_DATA_STREAM.validatedMatch( formattedString, "AndroidAppDataStreamName.parse: formattedString not in valid format"); return of(matchMap.get("property"), matchMap.get("android_app_data_stream")); } @@ -89,7 +94,7 @@ public static List parseList(List formattedStr } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (AndroidAppDataStreamName value : values) { if (value == null) { list.add(""); @@ -101,16 +106,21 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY_ANDROID_APP_DATA_STREAM.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); - fieldMapBuilder.put("androidAppDataStream", androidAppDataStream); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (androidAppDataStream != null) { + fieldMapBuilder.put("android_app_data_stream", androidAppDataStream); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -124,16 +134,40 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( + return PROPERTY_ANDROID_APP_DATA_STREAM.instantiate( "property", property, "android_app_data_stream", androidAppDataStream); } - /** Builder for AndroidAppDataStreamName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AndroidAppDataStreamName that = ((AndroidAppDataStreamName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.androidAppDataStream, that.androidAppDataStream); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(androidAppDataStream); + return h; + } + + /** Builder for properties/{property}/androidAppDataStreams/{android_app_data_stream}. */ + public static class Builder { private String property; private String androidAppDataStream; + protected Builder() {} + public String getProperty() { return property; } @@ -152,8 +186,6 @@ public Builder setAndroidAppDataStream(String androidAppDataStream) { return this; } - private Builder() {} - private Builder(AndroidAppDataStreamName androidAppDataStreamName) { property = androidAppDataStreamName.property; androidAppDataStream = androidAppDataStreamName.androidAppDataStream; @@ -163,27 +195,4 @@ public AndroidAppDataStreamName build() { return new AndroidAppDataStreamName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AndroidAppDataStreamName) { - AndroidAppDataStreamName that = (AndroidAppDataStreamName) o; - return (this.property.equals(that.property)) - && (this.androidAppDataStream.equals(that.androidAppDataStream)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - h *= 1000003; - h ^= androidAppDataStream.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataSharingSettingsName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataSharingSettingsName.java index 16ecbac3..fb685bb3 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataSharingSettingsName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/DataSharingSettingsName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,18 +23,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class DataSharingSettingsName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate ACCOUNT = PathTemplate.createWithoutUrlEncoding("accounts/{account}/dataSharingSettings"); - private volatile Map fieldValuesMap; - private final String account; + @Deprecated + protected DataSharingSettingsName() { + account = null; + } + + private DataSharingSettingsName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + } + public String getAccount() { return account; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private DataSharingSettingsName(Builder builder) { - account = Preconditions.checkNotNull(builder.getAccount()); - } - public static DataSharingSettingsName of(String account) { return newBuilder().setAccount(account).build(); } @@ -64,7 +68,7 @@ public static DataSharingSettingsName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + ACCOUNT.validatedMatch( formattedString, "DataSharingSettingsName.parse: formattedString not in valid format"); return of(matchMap.get("account")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStri } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (DataSharingSettingsName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return ACCOUNT.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("account", account); + if (account != null) { + fieldMapBuilder.put("account", account); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("account", account); + return ACCOUNT.instantiate("account", account); } - /** Builder for DataSharingSettingsName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataSharingSettingsName that = ((DataSharingSettingsName) o); + return Objects.equals(this.account, that.account); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + return h; + } + + /** Builder for accounts/{account}/dataSharingSettings. */ + public static class Builder { private String account; + protected Builder() {} + public String getAccount() { return account; } @@ -129,8 +157,6 @@ public Builder setAccount(String account) { return this; } - private Builder() {} - private Builder(DataSharingSettingsName dataSharingSettingsName) { account = dataSharingSettingsName.account; } @@ -139,24 +165,4 @@ public DataSharingSettingsName build() { return new DataSharingSettingsName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof DataSharingSettingsName) { - DataSharingSettingsName that = (DataSharingSettingsName) o; - return (this.account.equals(that.account)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= account.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettings.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettings.java index ce47773d..4a0fa5cd 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettings.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettings.java @@ -288,8 +288,8 @@ public boolean getStreamEnabled() { * * *
-   * Output only. If enabled, capture a page view event each time a page loads or the
-   * website changes the browser history state.
+   * Output only. If enabled, capture a page view event each time a page loads
+   * or the website changes the browser history state.
    * 
* * bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1452,8 +1452,8 @@ public Builder clearStreamEnabled() { * * *
-     * Output only. If enabled, capture a page view event each time a page loads or the
-     * website changes the browser history state.
+     * Output only. If enabled, capture a page view event each time a page loads
+     * or the website changes the browser history state.
      * 
* * bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1468,8 +1468,8 @@ public boolean getPageViewsEnabled() { * * *
-     * Output only. If enabled, capture a page view event each time a page loads or the
-     * website changes the browser history state.
+     * Output only. If enabled, capture a page view event each time a page loads
+     * or the website changes the browser history state.
      * 
* * bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1487,8 +1487,8 @@ public Builder setPageViewsEnabled(boolean value) { * * *
-     * Output only. If enabled, capture a page view event each time a page loads or the
-     * website changes the browser history state.
+     * Output only. If enabled, capture a page view event each time a page loads
+     * or the website changes the browser history state.
      * 
* * bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsName.java index 6e337a28..cd54f7c1 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,20 +23,30 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class EnhancedMeasurementSettingsName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY_WEB_DATA_STREAM = PathTemplate.createWithoutUrlEncoding( "properties/{property}/webDataStreams/{web_data_stream}/enhancedMeasurementSettings"); - private volatile Map fieldValuesMap; - private final String property; private final String webDataStream; + @Deprecated + protected EnhancedMeasurementSettingsName() { + property = null; + webDataStream = null; + } + + private EnhancedMeasurementSettingsName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + webDataStream = Preconditions.checkNotNull(builder.getWebDataStream()); + } + public String getProperty() { return property; } @@ -53,11 +63,6 @@ public Builder toBuilder() { return new Builder(this); } - private EnhancedMeasurementSettingsName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - webDataStream = Preconditions.checkNotNull(builder.getWebDataStream()); - } - public static EnhancedMeasurementSettingsName of(String property, String webDataStream) { return newBuilder().setProperty(property).setWebDataStream(webDataStream).build(); } @@ -71,7 +76,7 @@ public static EnhancedMeasurementSettingsName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY_WEB_DATA_STREAM.validatedMatch( formattedString, "EnhancedMeasurementSettingsName.parse: formattedString not in valid format"); return of(matchMap.get("property"), matchMap.get("web_data_stream")); @@ -86,7 +91,7 @@ public static List parseList(List forma } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (EnhancedMeasurementSettingsName value : values) { if (value == null) { list.add(""); @@ -98,16 +103,21 @@ public static List toStringList(List va } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY_WEB_DATA_STREAM.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); - fieldMapBuilder.put("webDataStream", webDataStream); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (webDataStream != null) { + fieldMapBuilder.put("web_data_stream", webDataStream); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -121,15 +131,42 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property, "web_data_stream", webDataStream); + return PROPERTY_WEB_DATA_STREAM.instantiate( + "property", property, "web_data_stream", webDataStream); } - /** Builder for EnhancedMeasurementSettingsName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EnhancedMeasurementSettingsName that = ((EnhancedMeasurementSettingsName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.webDataStream, that.webDataStream); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(webDataStream); + return h; + } + + /** + * Builder for properties/{property}/webDataStreams/{web_data_stream}/enhancedMeasurementSettings. + */ + public static class Builder { private String property; private String webDataStream; + protected Builder() {} + public String getProperty() { return property; } @@ -148,8 +185,6 @@ public Builder setWebDataStream(String webDataStream) { return this; } - private Builder() {} - private Builder(EnhancedMeasurementSettingsName enhancedMeasurementSettingsName) { property = enhancedMeasurementSettingsName.property; webDataStream = enhancedMeasurementSettingsName.webDataStream; @@ -159,27 +194,4 @@ public EnhancedMeasurementSettingsName build() { return new EnhancedMeasurementSettingsName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof EnhancedMeasurementSettingsName) { - EnhancedMeasurementSettingsName that = (EnhancedMeasurementSettingsName) o; - return (this.property.equals(that.property)) - && (this.webDataStream.equals(that.webDataStream)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - h *= 1000003; - h ^= webDataStream.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsOrBuilder.java index ba05112a..e138a346 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsOrBuilder.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/EnhancedMeasurementSettingsOrBuilder.java @@ -74,8 +74,8 @@ public interface EnhancedMeasurementSettingsOrBuilder * * *
-   * Output only. If enabled, capture a page view event each time a page loads or the
-   * website changes the browser history state.
+   * Output only. If enabled, capture a page view event each time a page loads
+   * or the website changes the browser history state.
    * 
* * bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java index 9fd6eba3..08f6ee10 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLink.java @@ -197,9 +197,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-   * provide this resource name using either a project number or project ID.
-   * Once this resource has been created, returned FirebaseLinks will always
+   * Immutable. Firebase project resource name. When creating a FirebaseLink,
+   * you may provide this resource name using either a project number or project
+   * ID. Once this resource has been created, returned FirebaseLinks will always
    * have a project_name that contains a project number.
    * Format: 'projects/{project number}'
    * Example: 'projects/1234'
@@ -225,9 +225,9 @@ public java.lang.String getProject() {
    *
    *
    * 
-   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-   * provide this resource name using either a project number or project ID.
-   * Once this resource has been created, returned FirebaseLinks will always
+   * Immutable. Firebase project resource name. When creating a FirebaseLink,
+   * you may provide this resource name using either a project number or project
+   * ID. Once this resource has been created, returned FirebaseLinks will always
    * have a project_name that contains a project number.
    * Format: 'projects/{project number}'
    * Example: 'projects/1234'
@@ -830,9 +830,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-     * provide this resource name using either a project number or project ID.
-     * Once this resource has been created, returned FirebaseLinks will always
+     * Immutable. Firebase project resource name. When creating a FirebaseLink,
+     * you may provide this resource name using either a project number or project
+     * ID. Once this resource has been created, returned FirebaseLinks will always
      * have a project_name that contains a project number.
      * Format: 'projects/{project number}'
      * Example: 'projects/1234'
@@ -857,9 +857,9 @@ public java.lang.String getProject() {
      *
      *
      * 
-     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-     * provide this resource name using either a project number or project ID.
-     * Once this resource has been created, returned FirebaseLinks will always
+     * Immutable. Firebase project resource name. When creating a FirebaseLink,
+     * you may provide this resource name using either a project number or project
+     * ID. Once this resource has been created, returned FirebaseLinks will always
      * have a project_name that contains a project number.
      * Format: 'projects/{project number}'
      * Example: 'projects/1234'
@@ -884,9 +884,9 @@ public com.google.protobuf.ByteString getProjectBytes() {
      *
      *
      * 
-     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-     * provide this resource name using either a project number or project ID.
-     * Once this resource has been created, returned FirebaseLinks will always
+     * Immutable. Firebase project resource name. When creating a FirebaseLink,
+     * you may provide this resource name using either a project number or project
+     * ID. Once this resource has been created, returned FirebaseLinks will always
      * have a project_name that contains a project number.
      * Format: 'projects/{project number}'
      * Example: 'projects/1234'
@@ -910,9 +910,9 @@ public Builder setProject(java.lang.String value) {
      *
      *
      * 
-     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-     * provide this resource name using either a project number or project ID.
-     * Once this resource has been created, returned FirebaseLinks will always
+     * Immutable. Firebase project resource name. When creating a FirebaseLink,
+     * you may provide this resource name using either a project number or project
+     * ID. Once this resource has been created, returned FirebaseLinks will always
      * have a project_name that contains a project number.
      * Format: 'projects/{project number}'
      * Example: 'projects/1234'
@@ -932,9 +932,9 @@ public Builder clearProject() {
      *
      *
      * 
-     * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-     * provide this resource name using either a project number or project ID.
-     * Once this resource has been created, returned FirebaseLinks will always
+     * Immutable. Firebase project resource name. When creating a FirebaseLink,
+     * you may provide this resource name using either a project number or project
+     * ID. Once this resource has been created, returned FirebaseLinks will always
      * have a project_name that contains a project number.
      * Format: 'projects/{project number}'
      * Example: 'projects/1234'
diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkName.java
index 4b71c822..6a3724b4 100644
--- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkName.java
+++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkName.java
@@ -5,7 +5,7 @@
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *     https://www.apache.org/licenses/LICENSE-2.0
+ *      https://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -23,19 +23,29 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Generated;
 
-/** AUTO-GENERATED DOCUMENTATION AND CLASS */
-@javax.annotation.Generated("by GAPIC protoc plugin")
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+@Generated("by gapic-generator-java")
 public class FirebaseLinkName implements ResourceName {
-
-  private static final PathTemplate PATH_TEMPLATE =
+  private static final PathTemplate PROPERTY_FIREBASE_LINK =
       PathTemplate.createWithoutUrlEncoding("properties/{property}/firebaseLinks/{firebase_link}");
-
   private volatile Map fieldValuesMap;
-
   private final String property;
   private final String firebaseLink;
 
+  @Deprecated
+  protected FirebaseLinkName() {
+    property = null;
+    firebaseLink = null;
+  }
+
+  private FirebaseLinkName(Builder builder) {
+    property = Preconditions.checkNotNull(builder.getProperty());
+    firebaseLink = Preconditions.checkNotNull(builder.getFirebaseLink());
+  }
+
   public String getProperty() {
     return property;
   }
@@ -52,11 +62,6 @@ public Builder toBuilder() {
     return new Builder(this);
   }
 
-  private FirebaseLinkName(Builder builder) {
-    property = Preconditions.checkNotNull(builder.getProperty());
-    firebaseLink = Preconditions.checkNotNull(builder.getFirebaseLink());
-  }
-
   public static FirebaseLinkName of(String property, String firebaseLink) {
     return newBuilder().setProperty(property).setFirebaseLink(firebaseLink).build();
   }
@@ -70,7 +75,7 @@ public static FirebaseLinkName parse(String formattedString) {
       return null;
     }
     Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
+        PROPERTY_FIREBASE_LINK.validatedMatch(
             formattedString, "FirebaseLinkName.parse: formattedString not in valid format");
     return of(matchMap.get("property"), matchMap.get("firebase_link"));
   }
@@ -84,7 +89,7 @@ public static List parseList(List formattedStrings) {
   }
 
   public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
+    List list = new ArrayList<>(values.size());
     for (FirebaseLinkName value : values) {
       if (value == null) {
         list.add("");
@@ -96,16 +101,21 @@ public static List toStringList(List values) {
   }
 
   public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
+    return PROPERTY_FIREBASE_LINK.matches(formattedString);
   }
 
+  @Override
   public Map getFieldValuesMap() {
     if (fieldValuesMap == null) {
       synchronized (this) {
         if (fieldValuesMap == null) {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("property", property);
-          fieldMapBuilder.put("firebaseLink", firebaseLink);
+          if (property != null) {
+            fieldMapBuilder.put("property", property);
+          }
+          if (firebaseLink != null) {
+            fieldMapBuilder.put("firebase_link", firebaseLink);
+          }
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -119,15 +129,39 @@ public String getFieldValue(String fieldName) {
 
   @Override
   public String toString() {
-    return PATH_TEMPLATE.instantiate("property", property, "firebase_link", firebaseLink);
+    return PROPERTY_FIREBASE_LINK.instantiate("property", property, "firebase_link", firebaseLink);
   }
 
-  /** Builder for FirebaseLinkName. */
-  public static class Builder {
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o != null || getClass() == o.getClass()) {
+      FirebaseLinkName that = ((FirebaseLinkName) o);
+      return Objects.equals(this.property, that.property)
+          && Objects.equals(this.firebaseLink, that.firebaseLink);
+    }
+    return false;
+  }
 
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= Objects.hashCode(property);
+    h *= 1000003;
+    h ^= Objects.hashCode(firebaseLink);
+    return h;
+  }
+
+  /** Builder for properties/{property}/firebaseLinks/{firebase_link}. */
+  public static class Builder {
     private String property;
     private String firebaseLink;
 
+    protected Builder() {}
+
     public String getProperty() {
       return property;
     }
@@ -146,8 +180,6 @@ public Builder setFirebaseLink(String firebaseLink) {
       return this;
     }
 
-    private Builder() {}
-
     private Builder(FirebaseLinkName firebaseLinkName) {
       property = firebaseLinkName.property;
       firebaseLink = firebaseLinkName.firebaseLink;
@@ -157,26 +189,4 @@ public FirebaseLinkName build() {
       return new FirebaseLinkName(this);
     }
   }
-
-  @Override
-  public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o instanceof FirebaseLinkName) {
-      FirebaseLinkName that = (FirebaseLinkName) o;
-      return (this.property.equals(that.property)) && (this.firebaseLink.equals(that.firebaseLink));
-    }
-    return false;
-  }
-
-  @Override
-  public int hashCode() {
-    int h = 1;
-    h *= 1000003;
-    h ^= property.hashCode();
-    h *= 1000003;
-    h ^= firebaseLink.hashCode();
-    return h;
-  }
 }
diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java
index 547d198c..2a6c460e 100644
--- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java
+++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/FirebaseLinkOrBuilder.java
@@ -52,9 +52,9 @@ public interface FirebaseLinkOrBuilder
    *
    *
    * 
-   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-   * provide this resource name using either a project number or project ID.
-   * Once this resource has been created, returned FirebaseLinks will always
+   * Immutable. Firebase project resource name. When creating a FirebaseLink,
+   * you may provide this resource name using either a project number or project
+   * ID. Once this resource has been created, returned FirebaseLinks will always
    * have a project_name that contains a project number.
    * Format: 'projects/{project number}'
    * Example: 'projects/1234'
@@ -69,9 +69,9 @@ public interface FirebaseLinkOrBuilder
    *
    *
    * 
-   * Immutable. Firebase project resource name. When creating a FirebaseLink, you may
-   * provide this resource name using either a project number or project ID.
-   * Once this resource has been created, returned FirebaseLinks will always
+   * Immutable. Firebase project resource name. When creating a FirebaseLink,
+   * you may provide this resource name using either a project number or project
+   * ID. Once this resource has been created, returned FirebaseLinks will always
    * have a project_name that contains a project number.
    * Format: 'projects/{project number}'
    * Example: 'projects/1234'
diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTag.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTag.java
index c2adafd5..39ed18e2 100644
--- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTag.java
+++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTag.java
@@ -40,6 +40,7 @@ private GlobalSiteTag(com.google.protobuf.GeneratedMessageV3.Builder builder)
 
   private GlobalSiteTag() {
     snippet_ = "";
+    name_ = "";
   }
 
   @java.lang.Override
@@ -78,6 +79,13 @@ private GlobalSiteTag(
               snippet_ = s;
               break;
             }
+          case 18:
+            {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              name_ = s;
+              break;
+            }
           default:
             {
               if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -118,8 +126,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    *
    * 
-   * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-   * every webpage to measure.
+   * Immutable. JavaScript code snippet to be pasted as the first item into the
+   * head tag of every webpage to measure.
    * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -142,8 +150,8 @@ public java.lang.String getSnippet() { * * *
-   * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-   * every webpage to measure.
+   * Immutable. JavaScript code snippet to be pasted as the first item into the
+   * head tag of every webpage to measure.
    * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -163,6 +171,55 @@ public com.google.protobuf.ByteString getSnippetBytes() { } } + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of this tag.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of this tag.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -180,6 +237,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getSnippetBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, snippet_); } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } unknownFields.writeTo(output); } @@ -192,6 +252,9 @@ public int getSerializedSize() { if (!getSnippetBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, snippet_); } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -209,6 +272,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.analytics.admin.v1alpha.GlobalSiteTag) obj; if (!getSnippet().equals(other.getSnippet())) return false; + if (!getName().equals(other.getName())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -222,6 +286,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SNIPPET_FIELD_NUMBER; hash = (53 * hash) + getSnippet().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -370,6 +436,8 @@ public Builder clear() { super.clear(); snippet_ = ""; + name_ = ""; + return this; } @@ -398,6 +466,7 @@ public com.google.analytics.admin.v1alpha.GlobalSiteTag buildPartial() { com.google.analytics.admin.v1alpha.GlobalSiteTag result = new com.google.analytics.admin.v1alpha.GlobalSiteTag(this); result.snippet_ = snippet_; + result.name_ = name_; onBuilt(); return result; } @@ -452,6 +521,10 @@ public Builder mergeFrom(com.google.analytics.admin.v1alpha.GlobalSiteTag other) snippet_ = other.snippet_; onChanged(); } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -486,8 +559,8 @@ public Builder mergeFrom( * * *
-     * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-     * every webpage to measure.
+     * Immutable. JavaScript code snippet to be pasted as the first item into the
+     * head tag of every webpage to measure.
      * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -509,8 +582,8 @@ public java.lang.String getSnippet() { * * *
-     * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-     * every webpage to measure.
+     * Immutable. JavaScript code snippet to be pasted as the first item into the
+     * head tag of every webpage to measure.
      * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -532,8 +605,8 @@ public com.google.protobuf.ByteString getSnippetBytes() { * * *
-     * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-     * every webpage to measure.
+     * Immutable. JavaScript code snippet to be pasted as the first item into the
+     * head tag of every webpage to measure.
      * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -554,8 +627,8 @@ public Builder setSnippet(java.lang.String value) { * * *
-     * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-     * every webpage to measure.
+     * Immutable. JavaScript code snippet to be pasted as the first item into the
+     * head tag of every webpage to measure.
      * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -572,8 +645,8 @@ public Builder clearSnippet() { * * *
-     * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-     * every webpage to measure.
+     * Immutable. JavaScript code snippet to be pasted as the first item into the
+     * head tag of every webpage to measure.
      * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -592,6 +665,112 @@ public Builder setSnippetBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of this tag.
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of this tag.
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of this tag.
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of this tag.
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of this tag.
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagName.java index 3665ae9a..53b40a6a 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,18 +23,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class GlobalSiteTagName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY = PathTemplate.createWithoutUrlEncoding("properties/{property}/globalSiteTag"); - private volatile Map fieldValuesMap; - private final String property; + @Deprecated + protected GlobalSiteTagName() { + property = null; + } + + private GlobalSiteTagName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + } + public String getProperty() { return property; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private GlobalSiteTagName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - } - public static GlobalSiteTagName of(String property) { return newBuilder().setProperty(property).build(); } @@ -64,7 +68,7 @@ public static GlobalSiteTagName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY.validatedMatch( formattedString, "GlobalSiteTagName.parse: formattedString not in valid format"); return of(matchMap.get("property")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (GlobalSiteTagName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); + if (property != null) { + fieldMapBuilder.put("property", property); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property); + return PROPERTY.instantiate("property", property); } - /** Builder for GlobalSiteTagName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + GlobalSiteTagName that = ((GlobalSiteTagName) o); + return Objects.equals(this.property, that.property); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + + /** Builder for properties/{property}/globalSiteTag. */ + public static class Builder { private String property; + protected Builder() {} + public String getProperty() { return property; } @@ -129,8 +157,6 @@ public Builder setProperty(String property) { return this; } - private Builder() {} - private Builder(GlobalSiteTagName globalSiteTagName) { property = globalSiteTagName.property; } @@ -139,24 +165,4 @@ public GlobalSiteTagName build() { return new GlobalSiteTagName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof GlobalSiteTagName) { - GlobalSiteTagName that = (GlobalSiteTagName) o; - return (this.property.equals(that.property)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagOrBuilder.java index 7df2dd22..3b97b100 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagOrBuilder.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GlobalSiteTagOrBuilder.java @@ -27,8 +27,8 @@ public interface GlobalSiteTagOrBuilder * * *
-   * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-   * every webpage to measure.
+   * Immutable. JavaScript code snippet to be pasted as the first item into the
+   * head tag of every webpage to measure.
    * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -40,8 +40,8 @@ public interface GlobalSiteTagOrBuilder * * *
-   * Immutable. JavaScript code snippet to be pasted as the first item into the head tag of
-   * every webpage to measure.
+   * Immutable. JavaScript code snippet to be pasted as the first item into the
+   * head tag of every webpage to measure.
    * 
* * string snippet = 1 [(.google.api.field_behavior) = IMMUTABLE]; @@ -49,4 +49,29 @@ public interface GlobalSiteTagOrBuilder * @return The bytes for snippet. */ com.google.protobuf.ByteString getSnippetBytes(); + + /** + * + * + *
+   * The resource name of this tag.
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of this tag.
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java index 3cd05c41..295cd27a 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLink.java @@ -191,7 +191,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Output only. Format:
+   * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
    * Note: googleAdsLinkId is not the Google Ads customer ID.
    * 
* @@ -215,7 +216,8 @@ public java.lang.String getName() { * * *
-   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Output only. Format:
+   * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
    * Note: googleAdsLinkId is not the Google Ads customer ID.
    * 
* @@ -1030,7 +1032,8 @@ public Builder mergeFrom( * * *
-     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Output only. Format:
+     * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
      * Note: googleAdsLinkId is not the Google Ads customer ID.
      * 
* @@ -1053,7 +1056,8 @@ public java.lang.String getName() { * * *
-     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Output only. Format:
+     * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
      * Note: googleAdsLinkId is not the Google Ads customer ID.
      * 
* @@ -1076,7 +1080,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Output only. Format:
+     * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
      * Note: googleAdsLinkId is not the Google Ads customer ID.
      * 
* @@ -1098,7 +1103,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Output only. Format:
+     * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
      * Note: googleAdsLinkId is not the Google Ads customer ID.
      * 
* @@ -1116,7 +1122,8 @@ public Builder clearName() { * * *
-     * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+     * Output only. Format:
+     * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
      * Note: googleAdsLinkId is not the Google Ads customer ID.
      * 
* diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkName.java index e0c3592f..91246c4f 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,20 +23,30 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class GoogleAdsLinkName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY_GOOGLE_ADS_LINK = PathTemplate.createWithoutUrlEncoding( "properties/{property}/googleAdsLinks/{google_ads_link}"); - private volatile Map fieldValuesMap; - private final String property; private final String googleAdsLink; + @Deprecated + protected GoogleAdsLinkName() { + property = null; + googleAdsLink = null; + } + + private GoogleAdsLinkName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + googleAdsLink = Preconditions.checkNotNull(builder.getGoogleAdsLink()); + } + public String getProperty() { return property; } @@ -53,11 +63,6 @@ public Builder toBuilder() { return new Builder(this); } - private GoogleAdsLinkName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - googleAdsLink = Preconditions.checkNotNull(builder.getGoogleAdsLink()); - } - public static GoogleAdsLinkName of(String property, String googleAdsLink) { return newBuilder().setProperty(property).setGoogleAdsLink(googleAdsLink).build(); } @@ -71,7 +76,7 @@ public static GoogleAdsLinkName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY_GOOGLE_ADS_LINK.validatedMatch( formattedString, "GoogleAdsLinkName.parse: formattedString not in valid format"); return of(matchMap.get("property"), matchMap.get("google_ads_link")); } @@ -85,7 +90,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (GoogleAdsLinkName value : values) { if (value == null) { list.add(""); @@ -97,16 +102,21 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY_GOOGLE_ADS_LINK.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); - fieldMapBuilder.put("googleAdsLink", googleAdsLink); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (googleAdsLink != null) { + fieldMapBuilder.put("google_ads_link", googleAdsLink); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -120,15 +130,40 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property, "google_ads_link", googleAdsLink); + return PROPERTY_GOOGLE_ADS_LINK.instantiate( + "property", property, "google_ads_link", googleAdsLink); } - /** Builder for GoogleAdsLinkName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + GoogleAdsLinkName that = ((GoogleAdsLinkName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.googleAdsLink, that.googleAdsLink); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(googleAdsLink); + return h; + } + + /** Builder for properties/{property}/googleAdsLinks/{google_ads_link}. */ + public static class Builder { private String property; private String googleAdsLink; + protected Builder() {} + public String getProperty() { return property; } @@ -147,8 +182,6 @@ public Builder setGoogleAdsLink(String googleAdsLink) { return this; } - private Builder() {} - private Builder(GoogleAdsLinkName googleAdsLinkName) { property = googleAdsLinkName.property; googleAdsLink = googleAdsLinkName.googleAdsLink; @@ -158,27 +191,4 @@ public GoogleAdsLinkName build() { return new GoogleAdsLinkName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof GoogleAdsLinkName) { - GoogleAdsLinkName that = (GoogleAdsLinkName) o; - return (this.property.equals(that.property)) - && (this.googleAdsLink.equals(that.googleAdsLink)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - h *= 1000003; - h ^= googleAdsLink.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkOrBuilder.java index 24f39731..1a06b00f 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkOrBuilder.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/GoogleAdsLinkOrBuilder.java @@ -27,7 +27,8 @@ public interface GoogleAdsLinkOrBuilder * * *
-   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Output only. Format:
+   * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
    * Note: googleAdsLinkId is not the Google Ads customer ID.
    * 
* @@ -40,7 +41,8 @@ public interface GoogleAdsLinkOrBuilder * * *
-   * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
+   * Output only. Format:
+   * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}
    * Note: googleAdsLinkId is not the Google Ads customer ID.
    * 
* diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamName.java index 1ffceb9e..52915f6f 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/IosAppDataStreamName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,20 +23,30 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class IosAppDataStreamName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY_IOS_APP_DATA_STREAM = PathTemplate.createWithoutUrlEncoding( "properties/{property}/iosAppDataStreams/{ios_app_data_stream}"); - private volatile Map fieldValuesMap; - private final String property; private final String iosAppDataStream; + @Deprecated + protected IosAppDataStreamName() { + property = null; + iosAppDataStream = null; + } + + private IosAppDataStreamName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + iosAppDataStream = Preconditions.checkNotNull(builder.getIosAppDataStream()); + } + public String getProperty() { return property; } @@ -53,11 +63,6 @@ public Builder toBuilder() { return new Builder(this); } - private IosAppDataStreamName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - iosAppDataStream = Preconditions.checkNotNull(builder.getIosAppDataStream()); - } - public static IosAppDataStreamName of(String property, String iosAppDataStream) { return newBuilder().setProperty(property).setIosAppDataStream(iosAppDataStream).build(); } @@ -75,7 +80,7 @@ public static IosAppDataStreamName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY_IOS_APP_DATA_STREAM.validatedMatch( formattedString, "IosAppDataStreamName.parse: formattedString not in valid format"); return of(matchMap.get("property"), matchMap.get("ios_app_data_stream")); } @@ -89,7 +94,7 @@ public static List parseList(List formattedStrings } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (IosAppDataStreamName value : values) { if (value == null) { list.add(""); @@ -101,16 +106,21 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY_IOS_APP_DATA_STREAM.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); - fieldMapBuilder.put("iosAppDataStream", iosAppDataStream); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (iosAppDataStream != null) { + fieldMapBuilder.put("ios_app_data_stream", iosAppDataStream); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -124,15 +134,40 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property, "ios_app_data_stream", iosAppDataStream); + return PROPERTY_IOS_APP_DATA_STREAM.instantiate( + "property", property, "ios_app_data_stream", iosAppDataStream); } - /** Builder for IosAppDataStreamName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + IosAppDataStreamName that = ((IosAppDataStreamName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.iosAppDataStream, that.iosAppDataStream); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(iosAppDataStream); + return h; + } + + /** Builder for properties/{property}/iosAppDataStreams/{ios_app_data_stream}. */ + public static class Builder { private String property; private String iosAppDataStream; + protected Builder() {} + public String getProperty() { return property; } @@ -151,8 +186,6 @@ public Builder setIosAppDataStream(String iosAppDataStream) { return this; } - private Builder() {} - private Builder(IosAppDataStreamName iosAppDataStreamName) { property = iosAppDataStreamName.property; iosAppDataStream = iosAppDataStreamName.iosAppDataStream; @@ -162,27 +195,4 @@ public IosAppDataStreamName build() { return new IosAppDataStreamName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof IosAppDataStreamName) { - IosAppDataStreamName that = (IosAppDataStreamName) o; - return (this.property.equals(that.property)) - && (this.iosAppDataStream.equals(that.iosAppDataStream)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - h *= 1000003; - h ^= iosAppDataStream.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java index 0a4fe0dd..6ab67845 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/Property.java @@ -603,8 +603,9 @@ public com.google.protobuf.ByteString getCurrencyCodeBytes() { * * *
-   * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties
-   * are excluded from List results unless specifically requested.
+   * Output only. Indicates whether this Property is soft-deleted or not.
+   * Deleted properties are excluded from List results unless specifically
+   * requested.
    * 
* * bool deleted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2191,8 +2192,9 @@ public Builder setCurrencyCodeBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties
-     * are excluded from List results unless specifically requested.
+     * Output only. Indicates whether this Property is soft-deleted or not.
+     * Deleted properties are excluded from List results unless specifically
+     * requested.
      * 
* * bool deleted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2207,8 +2209,9 @@ public boolean getDeleted() { * * *
-     * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties
-     * are excluded from List results unless specifically requested.
+     * Output only. Indicates whether this Property is soft-deleted or not.
+     * Deleted properties are excluded from List results unless specifically
+     * requested.
      * 
* * bool deleted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2226,8 +2229,9 @@ public Builder setDeleted(boolean value) { * * *
-     * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties
-     * are excluded from List results unless specifically requested.
+     * Output only. Indicates whether this Property is soft-deleted or not.
+     * Deleted properties are excluded from List results unless specifically
+     * requested.
      * 
* * bool deleted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyName.java index b3cbedf4..e4e7ebc7 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,18 +23,26 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class PropertyName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY = PathTemplate.createWithoutUrlEncoding("properties/{property}"); - private volatile Map fieldValuesMap; - private final String property; + @Deprecated + protected PropertyName() { + property = null; + } + + private PropertyName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + } + public String getProperty() { return property; } @@ -47,10 +55,6 @@ public Builder toBuilder() { return new Builder(this); } - private PropertyName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - } - public static PropertyName of(String property) { return newBuilder().setProperty(property).build(); } @@ -64,7 +68,7 @@ public static PropertyName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY.validatedMatch( formattedString, "PropertyName.parse: formattedString not in valid format"); return of(matchMap.get("property")); } @@ -78,7 +82,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (PropertyName value : values) { if (value == null) { list.add(""); @@ -90,15 +94,18 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); + if (property != null) { + fieldMapBuilder.put("property", property); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -112,14 +119,35 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property); + return PROPERTY.instantiate("property", property); } - /** Builder for PropertyName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PropertyName that = ((PropertyName) o); + return Objects.equals(this.property, that.property); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + + /** Builder for properties/{property}. */ + public static class Builder { private String property; + protected Builder() {} + public String getProperty() { return property; } @@ -129,8 +157,6 @@ public Builder setProperty(String property) { return this; } - private Builder() {} - private Builder(PropertyName propertyName) { property = propertyName.property; } @@ -139,24 +165,4 @@ public PropertyName build() { return new PropertyName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof PropertyName) { - PropertyName that = (PropertyName) o; - return (this.property.equals(that.property)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java index edd43768..3ad7d076 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/PropertyOrBuilder.java @@ -283,8 +283,9 @@ public interface PropertyOrBuilder * * *
-   * Output only. Indicates whether this Property is soft-deleted or not. Deleted properties
-   * are excluded from List results unless specifically requested.
+   * Output only. Indicates whether this Property is soft-deleted or not.
+   * Deleted properties are excluded from List results unless specifically
+   * requested.
    * 
* * bool deleted = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java index 3fe7c95a..adbc3486 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/ResourcesProto.java @@ -174,61 +174,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".v1alpha.MaximumUserAccess:d\352Aa\n*analyti" + "csadmin.googleapis.com/FirebaseLink\0223pro" + "perties/{property}/firebaseLinks/{fireba" - + "se_link}\"|\n\rGlobalSiteTag\022\024\n\007snippet\030\001 \001" - + "(\tB\003\340A\005:U\352AR\n+analyticsadmin.googleapis." - + "com/GlobalSiteTag\022#properties/{property}" - + "/globalSiteTag\"\245\003\n\rGoogleAdsLink\022\021\n\004name" - + "\030\001 \001(\tB\003\340A\003\022\023\n\006parent\030\002 \001(\tB\003\340A\005\022\030\n\013cust" - + "omer_id\030\003 \001(\tB\003\340A\005\022\037\n\022can_manage_clients" - + "\030\004 \001(\010B\003\340A\003\022?\n\033ads_personalization_enabl" - + "ed\030\005 \001(\0132\032.google.protobuf.BoolValue\022\032\n\r" - + "email_address\030\006 \001(\tB\003\340A\003\0224\n\013create_time\030" - + "\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224" - + "\n\013update_time\030\010 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003:h\352Ae\n+analyticsadmin.google" - + "apis.com/GoogleAdsLink\0226properties/{prop" - + "erty}/googleAdsLinks/{google_ads_link}\"\353" - + "\002\n\023DataSharingSettings\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\003\022+\n#sharing_with_google_support_enabled" - + "\030\002 \001(\010\0222\n*sharing_with_google_assigned_s" - + "ales_enabled\030\003 \001(\010\022-\n%sharing_with_googl" - + "e_any_sales_enabled\030\004 \001(\010\022,\n$sharing_wit" - + "h_google_products_enabled\030\005 \001(\010\022#\n\033shari" - + "ng_with_others_enabled\030\006 \001(\010:^\352A[\n1analy" - + "ticsadmin.googleapis.com/DataSharingSett" - + "ings\022&accounts/{account}/dataSharingSett" - + "ings\"\225\002\n\016AccountSummary\022\014\n\004name\030\001 \001(\t\022;\n" - + "\007account\030\002 \001(\tB*\372A\'\n%analyticsadmin.goog" - + "leapis.com/Account\022\024\n\014display_name\030\003 \001(\t" - + "\022K\n\022property_summaries\030\004 \003(\0132/.google.an" - + "alytics.admin.v1alpha.PropertySummary:U\352" - + "AR\n,analyticsadmin.googleapis.com/Accoun" - + "tSummary\022\"accountSummaries/{account_summ" - + "ary}\"f\n\017PropertySummary\022=\n\010property\030\001 \001(" - + "\tB+\372A(\n&analyticsadmin.googleapis.com/Pr" - + "operty\022\024\n\014display_name\030\002 \001(\t*\247\001\n\021Maximum" - + "UserAccess\022#\n\037MAXIMUM_USER_ACCESS_UNSPEC" - + "IFIED\020\000\022\r\n\tNO_ACCESS\020\001\022\024\n\020READ_AND_ANALY" - + "ZE\020\002\022\"\n\036EDITOR_WITHOUT_LINK_MANAGEMENT\020\003" - + "\022$\n EDITOR_INCLUDING_LINK_MANAGEMENT\020\004*\252" - + "\004\n\020IndustryCategory\022!\n\035INDUSTRY_CATEGORY" - + "_UNSPECIFIED\020\000\022\016\n\nAUTOMOTIVE\020\001\022#\n\037BUSINE" - + "SS_AND_INDUSTRIAL_MARKETS\020\002\022\013\n\007FINANCE\020\003" - + "\022\016\n\nHEALTHCARE\020\004\022\016\n\nTECHNOLOGY\020\005\022\n\n\006TRAV" - + "EL\020\006\022\t\n\005OTHER\020\007\022\032\n\026ARTS_AND_ENTERTAINMEN" - + "T\020\010\022\026\n\022BEAUTY_AND_FITNESS\020\t\022\030\n\024BOOKS_AND" - + "_LITERATURE\020\n\022\022\n\016FOOD_AND_DRINK\020\013\022\t\n\005GAM" - + "ES\020\014\022\027\n\023HOBBIES_AND_LEISURE\020\r\022\023\n\017HOME_AN" - + "D_GARDEN\020\016\022\030\n\024INTERNET_AND_TELECOM\020\017\022\026\n\022" - + "LAW_AND_GOVERNMENT\020\020\022\010\n\004NEWS\020\021\022\026\n\022ONLINE" - + "_COMMUNITIES\020\022\022\026\n\022PEOPLE_AND_SOCIETY\020\023\022\024" - + "\n\020PETS_AND_ANIMALS\020\024\022\017\n\013REAL_ESTATE\020\025\022\r\n" - + "\tREFERENCE\020\026\022\013\n\007SCIENCE\020\027\022\n\n\006SPORTS\020\030\022\026\n" - + "\022JOBS_AND_EDUCATION\020\031\022\014\n\010SHOPPING\020\032B{\n\"c" - + "om.google.analytics.admin.v1alphaB\016Resou" - + "rcesProtoP\001ZCgoogle.golang.org/genproto/" - + "googleapis/analytics/admin/v1alpha;admin" - + "b\006proto3" + + "se_link}\"\212\001\n\rGlobalSiteTag\022\024\n\007snippet\030\001 " + + "\001(\tB\003\340A\005\022\014\n\004name\030\002 \001(\t:U\352AR\n+analyticsad" + + "min.googleapis.com/GlobalSiteTag\022#proper" + + "ties/{property}/globalSiteTag\"\245\003\n\rGoogle" + + "AdsLink\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\023\n\006parent\030\002 \001" + + "(\tB\003\340A\005\022\030\n\013customer_id\030\003 \001(\tB\003\340A\005\022\037\n\022can" + + "_manage_clients\030\004 \001(\010B\003\340A\003\022?\n\033ads_person" + + "alization_enabled\030\005 \001(\0132\032.google.protobu" + + "f.BoolValue\022\032\n\remail_address\030\006 \001(\tB\003\340A\003\022" + + "4\n\013create_time\030\007 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0224\n\013update_time\030\010 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003:h\352Ae\n+analyt" + + "icsadmin.googleapis.com/GoogleAdsLink\0226p" + + "roperties/{property}/googleAdsLinks/{goo" + + "gle_ads_link}\"\353\002\n\023DataSharingSettings\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\003\022+\n#sharing_with_google_" + + "support_enabled\030\002 \001(\010\0222\n*sharing_with_go" + + "ogle_assigned_sales_enabled\030\003 \001(\010\022-\n%sha" + + "ring_with_google_any_sales_enabled\030\004 \001(\010" + + "\022,\n$sharing_with_google_products_enabled" + + "\030\005 \001(\010\022#\n\033sharing_with_others_enabled\030\006 " + + "\001(\010:^\352A[\n1analyticsadmin.googleapis.com/" + + "DataSharingSettings\022&accounts/{account}/" + + "dataSharingSettings\"\225\002\n\016AccountSummary\022\014" + + "\n\004name\030\001 \001(\t\022;\n\007account\030\002 \001(\tB*\372A\'\n%anal" + + "yticsadmin.googleapis.com/Account\022\024\n\014dis" + + "play_name\030\003 \001(\t\022K\n\022property_summaries\030\004 " + + "\003(\0132/.google.analytics.admin.v1alpha.Pro" + + "pertySummary:U\352AR\n,analyticsadmin.google" + + "apis.com/AccountSummary\022\"accountSummarie" + + "s/{account_summary}\"f\n\017PropertySummary\022=" + + "\n\010property\030\001 \001(\tB+\372A(\n&analyticsadmin.go" + + "ogleapis.com/Property\022\024\n\014display_name\030\002 " + + "\001(\t*\247\001\n\021MaximumUserAccess\022#\n\037MAXIMUM_USE" + + "R_ACCESS_UNSPECIFIED\020\000\022\r\n\tNO_ACCESS\020\001\022\024\n" + + "\020READ_AND_ANALYZE\020\002\022\"\n\036EDITOR_WITHOUT_LI" + + "NK_MANAGEMENT\020\003\022$\n EDITOR_INCLUDING_LINK" + + "_MANAGEMENT\020\004*\252\004\n\020IndustryCategory\022!\n\035IN" + + "DUSTRY_CATEGORY_UNSPECIFIED\020\000\022\016\n\nAUTOMOT" + + "IVE\020\001\022#\n\037BUSINESS_AND_INDUSTRIAL_MARKETS" + + "\020\002\022\013\n\007FINANCE\020\003\022\016\n\nHEALTHCARE\020\004\022\016\n\nTECHN" + + "OLOGY\020\005\022\n\n\006TRAVEL\020\006\022\t\n\005OTHER\020\007\022\032\n\026ARTS_A" + + "ND_ENTERTAINMENT\020\010\022\026\n\022BEAUTY_AND_FITNESS" + + "\020\t\022\030\n\024BOOKS_AND_LITERATURE\020\n\022\022\n\016FOOD_AND" + + "_DRINK\020\013\022\t\n\005GAMES\020\014\022\027\n\023HOBBIES_AND_LEISU" + + "RE\020\r\022\023\n\017HOME_AND_GARDEN\020\016\022\030\n\024INTERNET_AN" + + "D_TELECOM\020\017\022\026\n\022LAW_AND_GOVERNMENT\020\020\022\010\n\004N" + + "EWS\020\021\022\026\n\022ONLINE_COMMUNITIES\020\022\022\026\n\022PEOPLE_" + + "AND_SOCIETY\020\023\022\024\n\020PETS_AND_ANIMALS\020\024\022\017\n\013R" + + "EAL_ESTATE\020\025\022\r\n\tREFERENCE\020\026\022\013\n\007SCIENCE\020\027" + + "\022\n\n\006SPORTS\020\030\022\026\n\022JOBS_AND_EDUCATION\020\031\022\014\n\010" + + "SHOPPING\020\032B{\n\"com.google.analytics.admin" + + ".v1alphaB\016ResourcesProtoP\001ZCgoogle.golan" + + "g.org/genproto/googleapis/analytics/admi" + + "n/v1alpha;adminb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -348,7 +348,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_analytics_admin_v1alpha_GlobalSiteTag_descriptor, new java.lang.String[] { - "Snippet", + "Snippet", "Name", }); internal_static_google_analytics_admin_v1alpha_GoogleAdsLink_descriptor = getDescriptor().getMessageTypes().get(10); diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java index 276cc11f..e07131ea 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/UserLinkName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,26 +26,42 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class UserLinkName implements ResourceName { - - @Deprecated - protected UserLinkName() {} - - private static final PathTemplate ACCOUNT_USER_LINK_PATH_TEMPLATE = + private static final PathTemplate ACCOUNT_USER_LINK = PathTemplate.createWithoutUrlEncoding("accounts/{account}/userLinks/{user_link}"); - private static final PathTemplate PROPERTY_USER_LINK_PATH_TEMPLATE = + private static final PathTemplate PROPERTY_USER_LINK = PathTemplate.createWithoutUrlEncoding("properties/{property}/userLinks/{user_link}"); - private volatile Map fieldValuesMap; private PathTemplate pathTemplate; private String fixedValue; + private final String account; + private final String userLink; + private final String property; - private String account; - private String userLink; - private String property; + @Deprecated + protected UserLinkName() { + account = null; + userLink = null; + property = null; + } + + private UserLinkName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + userLink = Preconditions.checkNotNull(builder.getUserLink()); + property = null; + pathTemplate = ACCOUNT_USER_LINK; + } + + private UserLinkName(PropertyUserLinkBuilder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + userLink = Preconditions.checkNotNull(builder.getUserLink()); + account = null; + pathTemplate = PROPERTY_USER_LINK; + } public String getAccount() { return account; @@ -59,18 +75,6 @@ public String getProperty() { return property; } - private UserLinkName(Builder builder) { - account = Preconditions.checkNotNull(builder.getAccount()); - userLink = Preconditions.checkNotNull(builder.getUserLink()); - pathTemplate = ACCOUNT_USER_LINK_PATH_TEMPLATE; - } - - private UserLinkName(PropertyUserLinkBuilder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - userLink = Preconditions.checkNotNull(builder.getUserLink()); - pathTemplate = PROPERTY_USER_LINK_PATH_TEMPLATE; - } - public static Builder newBuilder() { return new Builder(); } @@ -90,12 +94,12 @@ public Builder toBuilder() { } public static UserLinkName of(String account, String userLink) { - return newAccountUserLinkBuilder().setAccount(account).setUserLink(userLink).build(); + return newBuilder().setAccount(account).setUserLink(userLink).build(); } @BetaApi("The static create methods are not stable yet and may be changed in the future.") public static UserLinkName ofAccountUserLinkName(String account, String userLink) { - return newAccountUserLinkBuilder().setAccount(account).setUserLink(userLink).build(); + return newBuilder().setAccount(account).setUserLink(userLink).build(); } @BetaApi("The static create methods are not stable yet and may be changed in the future.") @@ -125,14 +129,14 @@ public static UserLinkName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - if (ACCOUNT_USER_LINK_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = ACCOUNT_USER_LINK_PATH_TEMPLATE.match(formattedString); + if (ACCOUNT_USER_LINK.matches(formattedString)) { + Map matchMap = ACCOUNT_USER_LINK.match(formattedString); return ofAccountUserLinkName(matchMap.get("account"), matchMap.get("user_link")); - } else if (PROPERTY_USER_LINK_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = PROPERTY_USER_LINK_PATH_TEMPLATE.match(formattedString); + } else if (PROPERTY_USER_LINK.matches(formattedString)) { + Map matchMap = PROPERTY_USER_LINK.match(formattedString); return ofPropertyUserLinkName(matchMap.get("property"), matchMap.get("user_link")); } - throw new ValidationException("JobName.parse: formattedString not in valid format"); + throw new ValidationException("UserLinkName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -156,8 +160,8 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return ACCOUNT_USER_LINK_PATH_TEMPLATE.matches(formattedString) - || PROPERTY_USER_LINK_PATH_TEMPLATE.matches(formattedString); + return ACCOUNT_USER_LINK.matches(formattedString) + || PROPERTY_USER_LINK.matches(formattedString); } @Override @@ -191,9 +195,36 @@ public String toString() { return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + UserLinkName that = ((UserLinkName) o); + return Objects.equals(this.account, that.account) + && Objects.equals(this.userLink, that.userLink) + && Objects.equals(this.property, that.property); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(userLink); + h *= 1000003; + h ^= Objects.hashCode(property); + return h; + } + /** Builder for accounts/{account}/userLinks/{user_link}. */ public static class Builder { - private String account; private String userLink; @@ -219,9 +250,8 @@ public Builder setUserLink(String userLink) { private Builder(UserLinkName userLinkName) { Preconditions.checkArgument( - userLinkName.pathTemplate == ACCOUNT_USER_LINK_PATH_TEMPLATE, - "toBuilder is only supported when UserLinkName has the pattern of " - + "accounts/{account}/userLinks/{user_link}."); + Objects.equals(userLinkName.pathTemplate, ACCOUNT_USER_LINK), + "toBuilder is only supported when UserLinkName has the pattern of accounts/{account}/userLinks/{user_link}"); account = userLinkName.account; userLink = userLinkName.userLink; } @@ -234,11 +264,10 @@ public UserLinkName build() { /** Builder for properties/{property}/userLinks/{user_link}. */ @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") public static class PropertyUserLinkBuilder { - private String property; private String userLink; - private PropertyUserLinkBuilder() {} + protected PropertyUserLinkBuilder() {} public String getProperty() { return property; @@ -262,32 +291,4 @@ public UserLinkName build() { return new UserLinkName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - UserLinkName that = (UserLinkName) o; - return (Objects.equals(this.account, that.account)) - && (Objects.equals(this.userLink, that.userLink)) - && (Objects.equals(this.property, that.property)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(account); - h *= 1000003; - h ^= Objects.hashCode(userLink); - h *= 1000003; - h ^= Objects.hashCode(property); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/WebDataStreamName.java b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/WebDataStreamName.java index b774e15d..b9f43cfc 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/WebDataStreamName.java +++ b/proto-google-analytics-admin-v1alpha/src/main/java/com/google/analytics/admin/v1alpha/WebDataStreamName.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,20 +23,30 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") public class WebDataStreamName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = + private static final PathTemplate PROPERTY_WEB_DATA_STREAM = PathTemplate.createWithoutUrlEncoding( "properties/{property}/webDataStreams/{web_data_stream}"); - private volatile Map fieldValuesMap; - private final String property; private final String webDataStream; + @Deprecated + protected WebDataStreamName() { + property = null; + webDataStream = null; + } + + private WebDataStreamName(Builder builder) { + property = Preconditions.checkNotNull(builder.getProperty()); + webDataStream = Preconditions.checkNotNull(builder.getWebDataStream()); + } + public String getProperty() { return property; } @@ -53,11 +63,6 @@ public Builder toBuilder() { return new Builder(this); } - private WebDataStreamName(Builder builder) { - property = Preconditions.checkNotNull(builder.getProperty()); - webDataStream = Preconditions.checkNotNull(builder.getWebDataStream()); - } - public static WebDataStreamName of(String property, String webDataStream) { return newBuilder().setProperty(property).setWebDataStream(webDataStream).build(); } @@ -71,7 +76,7 @@ public static WebDataStreamName parse(String formattedString) { return null; } Map matchMap = - PATH_TEMPLATE.validatedMatch( + PROPERTY_WEB_DATA_STREAM.validatedMatch( formattedString, "WebDataStreamName.parse: formattedString not in valid format"); return of(matchMap.get("property"), matchMap.get("web_data_stream")); } @@ -85,7 +90,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (WebDataStreamName value : values) { if (value == null) { list.add(""); @@ -97,16 +102,21 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROPERTY_WEB_DATA_STREAM.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("property", property); - fieldMapBuilder.put("webDataStream", webDataStream); + if (property != null) { + fieldMapBuilder.put("property", property); + } + if (webDataStream != null) { + fieldMapBuilder.put("web_data_stream", webDataStream); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -120,15 +130,40 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("property", property, "web_data_stream", webDataStream); + return PROPERTY_WEB_DATA_STREAM.instantiate( + "property", property, "web_data_stream", webDataStream); } - /** Builder for WebDataStreamName. */ - public static class Builder { + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + WebDataStreamName that = ((WebDataStreamName) o); + return Objects.equals(this.property, that.property) + && Objects.equals(this.webDataStream, that.webDataStream); + } + return false; + } + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(property); + h *= 1000003; + h ^= Objects.hashCode(webDataStream); + return h; + } + + /** Builder for properties/{property}/webDataStreams/{web_data_stream}. */ + public static class Builder { private String property; private String webDataStream; + protected Builder() {} + public String getProperty() { return property; } @@ -147,8 +182,6 @@ public Builder setWebDataStream(String webDataStream) { return this; } - private Builder() {} - private Builder(WebDataStreamName webDataStreamName) { property = webDataStreamName.property; webDataStream = webDataStreamName.webDataStream; @@ -158,27 +191,4 @@ public WebDataStreamName build() { return new WebDataStreamName(this); } } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof WebDataStreamName) { - WebDataStreamName that = (WebDataStreamName) o; - return (this.property.equals(that.property)) - && (this.webDataStream.equals(that.webDataStream)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= property.hashCode(); - h *= 1000003; - h ^= webDataStream.hashCode(); - return h; - } } diff --git a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto index ce96dd84..4830e0c3 100644 --- a/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto +++ b/proto-google-analytics-admin-v1alpha/src/main/proto/google/analytics/admin/v1alpha/resources.proto @@ -144,10 +144,12 @@ message Account { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this account was originally created. - google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when account payload fields were last updated. - google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Human-readable display name for this account. string display_name = 4 [(google.api.field_behavior) = REQUIRED]; @@ -177,10 +179,12 @@ message Property { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when the entity was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when entity payload fields were last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Resource name of this property's logical parent. // @@ -216,8 +220,9 @@ message Property { // Examples: "USD", "EUR", "JPY" string currency_code = 8; - // Output only. Indicates whether this Property is soft-deleted or not. Deleted properties - // are excluded from List results unless specifically requested. + // Output only. Indicates whether this Property is soft-deleted or not. + // Deleted properties are excluded from List results unless specifically + // requested. bool deleted = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -238,10 +243,12 @@ message AndroidAppDataStream { string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this stream was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when stream payload fields were last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. The package name for the app being measured. // Example: "com.example.myandroidapp" @@ -270,10 +277,12 @@ message IosAppDataStream { string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this stream was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when stream payload fields were last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Required. Immutable. The Apple App Store Bundle ID for the app // Example: "com.example.myiosapp" @@ -309,10 +318,12 @@ message WebDataStream { string firebase_app_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this stream was originally created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when stream payload fields were last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Domain name of the web app being measured, or empty. // Example: "http://www.google.com", "https://www.google.com" @@ -400,8 +411,8 @@ message EnhancedMeasurementSettings { // whether they are respected. bool stream_enabled = 2; - // Output only. If enabled, capture a page view event each time a page loads or the - // website changes the browser history state. + // Output only. If enabled, capture a page view event each time a page loads + // or the website changes the browser history state. bool page_views_enabled = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // If enabled, capture scroll events each time a visitor gets to the bottom of @@ -473,9 +484,9 @@ message FirebaseLink { // Output only. Example format: properties/1234/firebaseLinks/5678 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Immutable. Firebase project resource name. When creating a FirebaseLink, you may - // provide this resource name using either a project number or project ID. - // Once this resource has been created, returned FirebaseLinks will always + // Immutable. Firebase project resource name. When creating a FirebaseLink, + // you may provide this resource name using either a project number or project + // ID. Once this resource has been created, returned FirebaseLinks will always // have a project_name that contains a project number. // // Format: 'projects/{project number}' @@ -483,7 +494,8 @@ message FirebaseLink { string project = 2 [(google.api.field_behavior) = IMMUTABLE]; // Output only. Time when this FirebaseLink was originally created. - google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Maximum user access to the GA4 property allowed to admins of // the linked Firebase project. @@ -498,9 +510,12 @@ message GlobalSiteTag { pattern: "properties/{property}/globalSiteTag" }; - // Immutable. JavaScript code snippet to be pasted as the first item into the head tag of - // every webpage to measure. + // Immutable. JavaScript code snippet to be pasted as the first item into the + // head tag of every webpage to measure. string snippet = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The resource name of this tag. + string name = 2; } // A link between an GA4 property and a Google Ads account. @@ -510,7 +525,8 @@ message GoogleAdsLink { pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" }; - // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // Output only. Format: + // properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} // // Note: googleAdsLinkId is not the Google Ads customer ID. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -535,10 +551,12 @@ message GoogleAdsLink { string email_address = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this link was originally created. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time when this link was last updated. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A resource message representing data sharing settings of a Google Analytics @@ -591,8 +609,8 @@ message AccountSummary { // Format: accounts/{account_id} // Example: "accounts/1000" string account = 2 [(google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/Account" - }]; + type: "analyticsadmin.googleapis.com/Account" + }]; // Display name for the account referred to in this account summary. string display_name = 3; @@ -607,8 +625,8 @@ message PropertySummary { // Format: properties/{property_id} // Example: "properties/1000" string property = 1 [(google.api.resource_reference) = { - type: "analyticsadmin.googleapis.com/Property" - }]; + type: "analyticsadmin.googleapis.com/Property" + }]; // Display name for the property referred to in this account summary. string display_name = 2; diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 39f7a801..81b91aad 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.analytics google-analytics-admin - 0.2.3 + 0.2.4 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6f7e6227..07f98789 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,7 +27,7 @@ com.google.analytics google-analytics-admin - 0.2.3 + 0.2.4 diff --git a/synth.metadata b/synth.metadata index 2ae02b1e..9b519505 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-analytics-admin.git", - "sha": "a35d1c311142fea5044113986b8d609fcb5f8772" + "sha": "8f2ae7d8b4618eeef7191c08706f1fced68f2e24" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b365fff50d84fbe03ea16d02cc73d72fa1fc864d", - "internalRef": "340922897" + "sha": "6d65640b1fcbdf26ea76cb720de0ac138cae9bed", + "internalRef": "347036369" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "943bb78606d035001123030067dffcc34f4645f2" + "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" } } ], diff --git a/versions.txt b/versions.txt index 8f95551c..644b0c89 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-analytics-admin:0.2.3:0.2.3 -proto-google-analytics-admin-v1alpha:0.2.3:0.2.3 -grpc-google-analytics-admin-v1alpha:0.2.3:0.2.3 \ No newline at end of file +google-analytics-admin:0.2.4:0.2.4 +proto-google-analytics-admin-v1alpha:0.2.4:0.2.4 +grpc-google-analytics-admin-v1alpha:0.2.4:0.2.4 \ No newline at end of file