This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * AccountLabel accountLabel = AccountLabel.newBuilder().build(); + * AccountLabel response = accountLabelsServiceClient.createAccountLabel(parent, accountLabel); + * } + * }+ * + *
Note: close() needs to be called on the AccountLabelsServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
Method | + *Description | + *Method Variants | + *
---|---|---|
ListAccountLabels | + *Lists the labels assigned to an account. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateAccountLabel | + *Creates a new label, not assigned to any account. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateAccountLabel | + *Updates a label. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteAccountLabel | + *Deletes a label and removes it from all accounts to which it was assigned. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of AccountLabelsServiceSettings + * to create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AccountLabelsServiceSettings accountLabelsServiceSettings = + * AccountLabelsServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create(accountLabelsServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AccountLabelsServiceSettings accountLabelsServiceSettings = + * AccountLabelsServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create(accountLabelsServiceSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AccountLabelsServiceSettings accountLabelsServiceSettings = + * AccountLabelsServiceSettings.newHttpJsonBuilder().build(); + * AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create(accountLabelsServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AccountLabelsServiceClient implements BackgroundResource { + private final AccountLabelsServiceSettings settings; + private final AccountLabelsServiceStub stub; + + /** Constructs an instance of AccountLabelsServiceClient with default settings. */ + public static final AccountLabelsServiceClient create() throws IOException { + return create(AccountLabelsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AccountLabelsServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AccountLabelsServiceClient create(AccountLabelsServiceSettings settings) + throws IOException { + return new AccountLabelsServiceClient(settings); + } + + /** + * Constructs an instance of AccountLabelsServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(AccountLabelsServiceSettings). + */ + public static final AccountLabelsServiceClient create(AccountLabelsServiceStub stub) { + return new AccountLabelsServiceClient(stub); + } + + /** + * Constructs an instance of AccountLabelsServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected AccountLabelsServiceClient(AccountLabelsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AccountLabelsServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AccountLabelsServiceClient(AccountLabelsServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AccountLabelsServiceSettings getSettings() { + return settings; + } + + public AccountLabelsServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the labels assigned to an account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * for (AccountLabel element : + * accountLabelsServiceClient.listAccountLabels(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent account. Format: accounts/{account} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountLabelsPagedResponse listAccountLabels(AccountName parent) { + ListAccountLabelsRequest request = + ListAccountLabelsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAccountLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the labels assigned to an account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * String parent = AccountName.of("[ACCOUNT]").toString(); + * for (AccountLabel element : + * accountLabelsServiceClient.listAccountLabels(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent account. Format: accounts/{account} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountLabelsPagedResponse listAccountLabels(String parent) { + ListAccountLabelsRequest request = + ListAccountLabelsRequest.newBuilder().setParent(parent).build(); + return listAccountLabels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the labels assigned to an account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * ListAccountLabelsRequest request = + * ListAccountLabelsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (AccountLabel element : + * accountLabelsServiceClient.listAccountLabels(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAccountLabelsPagedResponse listAccountLabels(ListAccountLabelsRequest request) { + return listAccountLabelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the labels assigned to an account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * ListAccountLabelsRequest request = + * ListAccountLabelsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * accountLabelsServiceClient.listAccountLabelsPagedCallable().futureCall(request); + * // Do something. + * for (AccountLabel element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * ListAccountLabelsRequest request = + * ListAccountLabelsRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListAccountLabelsResponse response = + * accountLabelsServiceClient.listAccountLabelsCallable().call(request); + * for (AccountLabel element : response.getAccountLabelsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * AccountName parent = AccountName.of("[ACCOUNT]"); + * AccountLabel accountLabel = AccountLabel.newBuilder().build(); + * AccountLabel response = accountLabelsServiceClient.createAccountLabel(parent, accountLabel); + * } + * }+ * + * @param parent Required. The parent account. Format: accounts/{account} + * @param accountLabel Required. The label to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AccountLabel createAccountLabel(AccountName parent, AccountLabel accountLabel) { + CreateAccountLabelRequest request = + CreateAccountLabelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAccountLabel(accountLabel) + .build(); + return createAccountLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new label, not assigned to any account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * String parent = AccountName.of("[ACCOUNT]").toString(); + * AccountLabel accountLabel = AccountLabel.newBuilder().build(); + * AccountLabel response = accountLabelsServiceClient.createAccountLabel(parent, accountLabel); + * } + * }+ * + * @param parent Required. The parent account. Format: accounts/{account} + * @param accountLabel Required. The label to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AccountLabel createAccountLabel(String parent, AccountLabel accountLabel) { + CreateAccountLabelRequest request = + CreateAccountLabelRequest.newBuilder() + .setParent(parent) + .setAccountLabel(accountLabel) + .build(); + return createAccountLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new label, not assigned to any account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * CreateAccountLabelRequest request = + * CreateAccountLabelRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setAccountLabel(AccountLabel.newBuilder().build()) + * .build(); + * AccountLabel response = accountLabelsServiceClient.createAccountLabel(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 + */ + public final AccountLabel createAccountLabel(CreateAccountLabelRequest request) { + return createAccountLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new label, not assigned to any account. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * CreateAccountLabelRequest request = + * CreateAccountLabelRequest.newBuilder() + * .setParent(AccountName.of("[ACCOUNT]").toString()) + * .setAccountLabel(AccountLabel.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * accountLabelsServiceClient.createAccountLabelCallable().futureCall(request); + * // Do something. + * AccountLabel response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * AccountLabel accountLabel = AccountLabel.newBuilder().build(); + * AccountLabel response = accountLabelsServiceClient.updateAccountLabel(accountLabel); + * } + * }+ * + * @param accountLabel Required. The updated label. All fields must be provided. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AccountLabel updateAccountLabel(AccountLabel accountLabel) { + UpdateAccountLabelRequest request = + UpdateAccountLabelRequest.newBuilder().setAccountLabel(accountLabel).build(); + return updateAccountLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a label. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * UpdateAccountLabelRequest request = + * UpdateAccountLabelRequest.newBuilder() + * .setAccountLabel(AccountLabel.newBuilder().build()) + * .build(); + * AccountLabel response = accountLabelsServiceClient.updateAccountLabel(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 + */ + public final AccountLabel updateAccountLabel(UpdateAccountLabelRequest request) { + return updateAccountLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a label. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * UpdateAccountLabelRequest request = + * UpdateAccountLabelRequest.newBuilder() + * .setAccountLabel(AccountLabel.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * accountLabelsServiceClient.updateAccountLabelCallable().futureCall(request); + * // Do something. + * AccountLabel response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * AccountLabelName name = AccountLabelName.of("[ACCOUNT]", "[LABEL]"); + * accountLabelsServiceClient.deleteAccountLabel(name); + * } + * }+ * + * @param name Required. The name of the label to delete. Format: + * accounts/{account}/labels/{label} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAccountLabel(AccountLabelName name) { + DeleteAccountLabelRequest request = + DeleteAccountLabelRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAccountLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a label and removes it from all accounts to which it was assigned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * String name = AccountLabelName.of("[ACCOUNT]", "[LABEL]").toString(); + * accountLabelsServiceClient.deleteAccountLabel(name); + * } + * }+ * + * @param name Required. The name of the label to delete. Format: + * accounts/{account}/labels/{label} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAccountLabel(String name) { + DeleteAccountLabelRequest request = + DeleteAccountLabelRequest.newBuilder().setName(name).build(); + deleteAccountLabel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a label and removes it from all accounts to which it was assigned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * DeleteAccountLabelRequest request = + * DeleteAccountLabelRequest.newBuilder() + * .setName(AccountLabelName.of("[ACCOUNT]", "[LABEL]").toString()) + * .build(); + * accountLabelsServiceClient.deleteAccountLabel(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 + */ + public final void deleteAccountLabel(DeleteAccountLabelRequest request) { + deleteAccountLabelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a label and removes it from all accounts to which it was assigned. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AccountLabelsServiceClient accountLabelsServiceClient = + * AccountLabelsServiceClient.create()) { + * DeleteAccountLabelRequest request = + * DeleteAccountLabelRequest.newBuilder() + * .setName(AccountLabelName.of("[ACCOUNT]", "[LABEL]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * accountLabelsServiceClient.deleteAccountLabelCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of createAccountLabel to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AccountLabelsServiceSettings.Builder accountLabelsServiceSettingsBuilder = + * AccountLabelsServiceSettings.newBuilder(); + * accountLabelsServiceSettingsBuilder + * .createAccountLabelSettings() + * .setRetrySettings( + * accountLabelsServiceSettingsBuilder + * .createAccountLabelSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * AccountLabelsServiceSettings accountLabelsServiceSettings = + * accountLabelsServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class AccountLabelsServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the AccountsServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. Retrieves a single CSS/MC account by ID. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. Updates labels assigned to CSS/MC accounts by a CSS domain. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of AccountsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class AccountsServiceClient implements BackgroundResource {
+ private final AccountsServiceSettings settings;
+ private final AccountsServiceStub stub;
+
+ /** Constructs an instance of AccountsServiceClient with default settings. */
+ public static final AccountsServiceClient create() throws IOException {
+ return create(AccountsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of AccountsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final AccountsServiceClient create(AccountsServiceSettings settings)
+ throws IOException {
+ return new AccountsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of AccountsServiceClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(AccountsServiceSettings).
+ */
+ public static final AccountsServiceClient create(AccountsServiceStub stub) {
+ return new AccountsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of AccountsServiceClient, using the given settings. This is protected so
+ * that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected AccountsServiceClient(AccountsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((AccountsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected AccountsServiceClient(AccountsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final AccountsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public AccountsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the accounts under the specified CSS account ID, and optionally filters by label ID
+ * and account name.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getAccount to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the CssProductInputsServiceClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * Uploads a CssProductInput to your CSS Center account. If an input with the same contentLanguage, identity, feedLabel and feedId already exists, this method replaces that entry.
+ * After inserting, updating, or deleting a CSS Product input, it may take several minutes before the processed CSS Product can be retrieved. Request object method variants only take one parameter, a request object, which must be constructed before the call. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. Deletes a CSS Product input from your CSS Center account.
+ * After a delete it may take several minutes until the input is no longer available. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of
+ * CssProductInputsServiceSettings to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class CssProductInputsServiceClient implements BackgroundResource {
+ private final CssProductInputsServiceSettings settings;
+ private final CssProductInputsServiceStub stub;
+
+ /** Constructs an instance of CssProductInputsServiceClient with default settings. */
+ public static final CssProductInputsServiceClient create() throws IOException {
+ return create(CssProductInputsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of CssProductInputsServiceClient, using the given settings. The channels
+ * are created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final CssProductInputsServiceClient create(CssProductInputsServiceSettings settings)
+ throws IOException {
+ return new CssProductInputsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of CssProductInputsServiceClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(CssProductInputsServiceSettings).
+ */
+ public static final CssProductInputsServiceClient create(CssProductInputsServiceStub stub) {
+ return new CssProductInputsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of CssProductInputsServiceClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected CssProductInputsServiceClient(CssProductInputsServiceSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((CssProductInputsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected CssProductInputsServiceClient(CssProductInputsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final CssProductInputsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public CssProductInputsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Uploads a CssProductInput to your CSS Center account. If an input with the same
+ * contentLanguage, identity, feedLabel and feedId already exists, this method replaces that
+ * entry.
+ *
+ * After inserting, updating, or deleting a CSS Product input, it may take several minutes
+ * before the processed CSS Product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS Product input, it may take several minutes
+ * before the processed CSS Product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After a delete it may take several minutes until the input is no longer available.
+ *
+ * Sample code:
+ *
+ * After a delete it may take several minutes until the input is no longer available.
+ *
+ * Sample code:
+ *
+ * After a delete it may take several minutes until the input is no longer available.
+ *
+ * Sample code:
+ *
+ * After a delete it may take several minutes until the input is no longer available.
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of insertCssProductInput to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the CssProductsServiceClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or deleting a product input, it may take several minutes before the updated final product can be retrieved. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. Lists the processed CSS Products in your CSS Center account. The response might contain fewer items than specified by pageSize. Rely on pageToken to determine if there are more items to be requested.
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes before the updated processed CSS product can be retrieved. Request object method variants only take one parameter, a request object, which must be constructed before the call. "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of CssProductsServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class CssProductsServiceClient implements BackgroundResource {
+ private final CssProductsServiceSettings settings;
+ private final CssProductsServiceStub stub;
+
+ /** Constructs an instance of CssProductsServiceClient with default settings. */
+ public static final CssProductsServiceClient create() throws IOException {
+ return create(CssProductsServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of CssProductsServiceClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final CssProductsServiceClient create(CssProductsServiceSettings settings)
+ throws IOException {
+ return new CssProductsServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of CssProductsServiceClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(CssProductsServiceSettings).
+ */
+ public static final CssProductsServiceClient create(CssProductsServiceStub stub) {
+ return new CssProductsServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of CssProductsServiceClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected CssProductsServiceClient(CssProductsServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((CssProductsServiceStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected CssProductsServiceClient(CssProductsServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final CssProductsServiceSettings getSettings() {
+ return settings;
+ }
+
+ public CssProductsServiceStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or
+ * deleting a product input, it may take several minutes before the updated final product can be
+ * retrieved.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes
+ * before the updated processed CSS product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes
+ * before the updated processed CSS product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes
+ * before the updated processed CSS product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes
+ * before the updated processed CSS product can be retrieved.
+ *
+ * Sample code:
+ *
+ * After inserting, updating, or deleting a CSS product input, it may take several minutes
+ * before the updated processed CSS product can be retrieved.
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getCssProduct to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= AccountsServiceClient =======================
+ *
+ * Service Description: Service for managing CSS/MC account information.
+ *
+ * Sample for AccountsServiceClient:
+ *
+ * ======================= AccountLabelsServiceClient =======================
+ *
+ * Service Description: Manages Merchant Center and CSS accounts labels.
+ *
+ * Sample for AccountLabelsServiceClient:
+ *
+ * ======================= CssProductInputsServiceClient =======================
+ *
+ * Service Description: Service to use CssProductInput resource. This service helps to
+ * insert/update/delete CSS Products.
+ *
+ * Sample for CssProductInputsServiceClient:
+ *
+ * ======================= CssProductsServiceClient =======================
+ *
+ * Service Description: Service for doing get and list on Css Products(a.k.a Aggregate Offers
+ * internally).
+ *
+ * Sample for CssProductsServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class AccountLabelsServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createAccountLabel to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class AccountsServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getAccount to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class CssProductInputsServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of insertCssProductInput to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class CssProductsServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getCssProduct to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAccountLabelsServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAccountLabelsServiceStub extends AccountLabelsServiceStub {
+ private static final MethodDescriptor{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * AccountName name = AccountName.of("[ACCOUNT]");
+ * Account response = accountsServiceClient.getAccount(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ * ListChildAccounts
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * GetAccount
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * UpdateLabels
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountsServiceSettings accountsServiceSettings =
+ * AccountsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AccountsServiceClient accountsServiceClient =
+ * AccountsServiceClient.create(accountsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountsServiceSettings accountsServiceSettings =
+ * AccountsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AccountsServiceClient accountsServiceClient =
+ * AccountsServiceClient.create(accountsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountsServiceSettings accountsServiceSettings =
+ * AccountsServiceSettings.newHttpJsonBuilder().build();
+ * AccountsServiceClient accountsServiceClient =
+ * AccountsServiceClient.create(accountsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * AccountName parent = AccountName.of("[ACCOUNT]");
+ * for (Account element : accountsServiceClient.listChildAccounts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent account. Must be a CSS group or domain. Format:
+ * accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListChildAccountsPagedResponse listChildAccounts(AccountName parent) {
+ ListChildAccountsRequest request =
+ ListChildAccountsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listChildAccounts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the accounts under the specified CSS account ID, and optionally filters by label ID
+ * and account name.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * String parent = AccountName.of("[ACCOUNT]").toString();
+ * for (Account element : accountsServiceClient.listChildAccounts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent account. Must be a CSS group or domain. Format:
+ * accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListChildAccountsPagedResponse listChildAccounts(String parent) {
+ ListChildAccountsRequest request =
+ ListChildAccountsRequest.newBuilder().setParent(parent).build();
+ return listChildAccounts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the accounts under the specified CSS account ID, and optionally filters by label ID
+ * and account name.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * ListChildAccountsRequest request =
+ * ListChildAccountsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setLabelId(-1959256506)
+ * .setFullName("fullName1330852282")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Account element : accountsServiceClient.listChildAccounts(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListChildAccountsPagedResponse listChildAccounts(ListChildAccountsRequest request) {
+ return listChildAccountsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the accounts under the specified CSS account ID, and optionally filters by label ID
+ * and account name.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * ListChildAccountsRequest request =
+ * ListChildAccountsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setLabelId(-1959256506)
+ * .setFullName("fullName1330852282")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * ListChildAccountsRequest request =
+ * ListChildAccountsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setLabelId(-1959256506)
+ * .setFullName("fullName1330852282")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListChildAccountsResponse response =
+ * accountsServiceClient.listChildAccountsCallable().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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * AccountName name = AccountName.of("[ACCOUNT]");
+ * Account response = accountsServiceClient.getAccount(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the managed CSS/MC account. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Account getAccount(AccountName name) {
+ GetAccountRequest request =
+ GetAccountRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAccount(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single CSS/MC account by ID.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * String name = AccountName.of("[ACCOUNT]").toString();
+ * Account response = accountsServiceClient.getAccount(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the managed CSS/MC account. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Account getAccount(String name) {
+ GetAccountRequest request = GetAccountRequest.newBuilder().setName(name).build();
+ return getAccount(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single CSS/MC account by ID.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * GetAccountRequest request =
+ * GetAccountRequest.newBuilder()
+ * .setName(AccountName.of("[ACCOUNT]").toString())
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .build();
+ * Account response = accountsServiceClient.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
+ */
+ public final Account getAccount(GetAccountRequest request) {
+ return getAccountCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single CSS/MC account by ID.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * GetAccountRequest request =
+ * GetAccountRequest.newBuilder()
+ * .setName(AccountName.of("[ACCOUNT]").toString())
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * AccountName name = AccountName.of("[ACCOUNT]");
+ * Account response = accountsServiceClient.updateLabels(name);
+ * }
+ * }
+ *
+ * @param name Required. The label resource name. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Account updateLabels(AccountName name) {
+ UpdateAccountLabelsRequest request =
+ UpdateAccountLabelsRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return updateLabels(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates labels assigned to CSS/MC accounts by a CSS domain.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * String name = AccountName.of("[ACCOUNT]").toString();
+ * Account response = accountsServiceClient.updateLabels(name);
+ * }
+ * }
+ *
+ * @param name Required. The label resource name. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Account updateLabels(String name) {
+ UpdateAccountLabelsRequest request =
+ UpdateAccountLabelsRequest.newBuilder().setName(name).build();
+ return updateLabels(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates labels assigned to CSS/MC accounts by a CSS domain.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * UpdateAccountLabelsRequest request =
+ * UpdateAccountLabelsRequest.newBuilder()
+ * .setName(AccountName.of("[ACCOUNT]").toString())
+ * .addAllLabelIds(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Account updateLabels(UpdateAccountLabelsRequest request) {
+ return updateLabelsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates labels assigned to CSS/MC accounts by a CSS domain.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * UpdateAccountLabelsRequest request =
+ * UpdateAccountLabelsRequest.newBuilder()
+ * .setName(AccountName.of("[ACCOUNT]").toString())
+ * .addAllLabelIds(new ArrayList
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountsServiceSettings.Builder accountsServiceSettingsBuilder =
+ * AccountsServiceSettings.newBuilder();
+ * accountsServiceSettingsBuilder
+ * .getAccountSettings()
+ * .setRetrySettings(
+ * accountsServiceSettingsBuilder
+ * .getAccountSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AccountsServiceSettings accountsServiceSettings = accountsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AccountsServiceSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * InsertCssProductInputRequest request =
+ * InsertCssProductInputRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setCssProductInput(CssProductInput.newBuilder().build())
+ * .setFeedId(-976011428)
+ * .build();
+ * CssProductInput response = cssProductInputsServiceClient.insertCssProductInput(request);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ * InsertCssProductInput
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * DeleteCssProductInput
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductInputsServiceSettings cssProductInputsServiceSettings =
+ * CssProductInputsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create(cssProductInputsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductInputsServiceSettings cssProductInputsServiceSettings =
+ * CssProductInputsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create(cssProductInputsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductInputsServiceSettings cssProductInputsServiceSettings =
+ * CssProductInputsServiceSettings.newHttpJsonBuilder().build();
+ * CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create(cssProductInputsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * InsertCssProductInputRequest request =
+ * InsertCssProductInputRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setCssProductInput(CssProductInput.newBuilder().build())
+ * .setFeedId(-976011428)
+ * .build();
+ * CssProductInput response = cssProductInputsServiceClient.insertCssProductInput(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
+ */
+ public final CssProductInput insertCssProductInput(InsertCssProductInputRequest request) {
+ return insertCssProductInputCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Uploads a CssProductInput to your CSS Center account. If an input with the same
+ * contentLanguage, identity, feedLabel and feedId already exists, this method replaces that
+ * entry.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * InsertCssProductInputRequest request =
+ * InsertCssProductInputRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setCssProductInput(CssProductInput.newBuilder().build())
+ * .setFeedId(-976011428)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * CssProductInputName name = CssProductInputName.of("[ACCOUNT]", "[CSS_PRODUCT_INPUT]");
+ * cssProductInputsServiceClient.deleteCssProductInput(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the CSS product input resource to delete. Format:
+ * accounts/{account}/cssProductInputs/{css_product_input}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteCssProductInput(CssProductInputName name) {
+ DeleteCssProductInputRequest request =
+ DeleteCssProductInputRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteCssProductInput(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a CSS Product input from your CSS Center account.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * String name = CssProductInputName.of("[ACCOUNT]", "[CSS_PRODUCT_INPUT]").toString();
+ * cssProductInputsServiceClient.deleteCssProductInput(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the CSS product input resource to delete. Format:
+ * accounts/{account}/cssProductInputs/{css_product_input}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteCssProductInput(String name) {
+ DeleteCssProductInputRequest request =
+ DeleteCssProductInputRequest.newBuilder().setName(name).build();
+ deleteCssProductInput(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a CSS Product input from your CSS Center account.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * DeleteCssProductInputRequest request =
+ * DeleteCssProductInputRequest.newBuilder()
+ * .setName(CssProductInputName.of("[ACCOUNT]", "[CSS_PRODUCT_INPUT]").toString())
+ * .setSupplementalFeedId(1845271745)
+ * .build();
+ * cssProductInputsServiceClient.deleteCssProductInput(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
+ */
+ public final void deleteCssProductInput(DeleteCssProductInputRequest request) {
+ deleteCssProductInputCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a CSS Product input from your CSS Center account.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * DeleteCssProductInputRequest request =
+ * DeleteCssProductInputRequest.newBuilder()
+ * .setName(CssProductInputName.of("[ACCOUNT]", "[CSS_PRODUCT_INPUT]").toString())
+ * .setSupplementalFeedId(1845271745)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductInputsServiceSettings.Builder cssProductInputsServiceSettingsBuilder =
+ * CssProductInputsServiceSettings.newBuilder();
+ * cssProductInputsServiceSettingsBuilder
+ * .insertCssProductInputSettings()
+ * .setRetrySettings(
+ * cssProductInputsServiceSettingsBuilder
+ * .insertCssProductInputSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CssProductInputsServiceSettings cssProductInputsServiceSettings =
+ * cssProductInputsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CssProductInputsServiceSettings
+ extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * CssProductName name = CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]");
+ * CssProduct response = cssProductsServiceClient.getCssProduct(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ * GetCssProduct
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * ListCssProducts
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductsServiceSettings cssProductsServiceSettings =
+ * CssProductsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * CssProductsServiceClient cssProductsServiceClient =
+ * CssProductsServiceClient.create(cssProductsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductsServiceSettings cssProductsServiceSettings =
+ * CssProductsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CssProductsServiceClient cssProductsServiceClient =
+ * CssProductsServiceClient.create(cssProductsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductsServiceSettings cssProductsServiceSettings =
+ * CssProductsServiceSettings.newHttpJsonBuilder().build();
+ * CssProductsServiceClient cssProductsServiceClient =
+ * CssProductsServiceClient.create(cssProductsServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * CssProductName name = CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]");
+ * CssProduct response = cssProductsServiceClient.getCssProduct(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the CSS product to retrieve.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CssProduct getCssProduct(CssProductName name) {
+ GetCssProductRequest request =
+ GetCssProductRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getCssProduct(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or
+ * deleting a product input, it may take several minutes before the updated final product can be
+ * retrieved.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * String name = CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]").toString();
+ * CssProduct response = cssProductsServiceClient.getCssProduct(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the CSS product to retrieve.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CssProduct getCssProduct(String name) {
+ GetCssProductRequest request = GetCssProductRequest.newBuilder().setName(name).build();
+ return getCssProduct(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or
+ * deleting a product input, it may take several minutes before the updated final product can be
+ * retrieved.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * GetCssProductRequest request =
+ * GetCssProductRequest.newBuilder()
+ * .setName(CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]").toString())
+ * .build();
+ * CssProduct response = cssProductsServiceClient.getCssProduct(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
+ */
+ public final CssProduct getCssProduct(GetCssProductRequest request) {
+ return getCssProductCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or
+ * deleting a product input, it may take several minutes before the updated final product can be
+ * retrieved.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * GetCssProductRequest request =
+ * GetCssProductRequest.newBuilder()
+ * .setName(CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * AccountName parent = AccountName.of("[ACCOUNT]");
+ * for (CssProduct element : cssProductsServiceClient.listCssProducts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The account/domain to list processed CSS Products for. Format:
+ * accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCssProductsPagedResponse listCssProducts(AccountName parent) {
+ ListCssProductsRequest request =
+ ListCssProductsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listCssProducts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processed CSS Products in your CSS Center account. The response might contain fewer
+ * items than specified by pageSize. Rely on pageToken to determine if there are more items to be
+ * requested.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * String parent = AccountName.of("[ACCOUNT]").toString();
+ * for (CssProduct element : cssProductsServiceClient.listCssProducts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The account/domain to list processed CSS Products for. Format:
+ * accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCssProductsPagedResponse listCssProducts(String parent) {
+ ListCssProductsRequest request = ListCssProductsRequest.newBuilder().setParent(parent).build();
+ return listCssProducts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processed CSS Products in your CSS Center account. The response might contain fewer
+ * items than specified by pageSize. Rely on pageToken to determine if there are more items to be
+ * requested.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * ListCssProductsRequest request =
+ * ListCssProductsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (CssProduct element : cssProductsServiceClient.listCssProducts(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCssProductsPagedResponse listCssProducts(ListCssProductsRequest request) {
+ return listCssProductsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the processed CSS Products in your CSS Center account. The response might contain fewer
+ * items than specified by pageSize. Rely on pageToken to determine if there are more items to be
+ * requested.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * ListCssProductsRequest request =
+ * ListCssProductsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * ListCssProductsRequest request =
+ * ListCssProductsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListCssProductsResponse response =
+ * cssProductsServiceClient.listCssProductsCallable().call(request);
+ * for (CssProduct element : response.getCssProductsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductsServiceSettings.Builder cssProductsServiceSettingsBuilder =
+ * CssProductsServiceSettings.newBuilder();
+ * cssProductsServiceSettingsBuilder
+ * .getCssProductSettings()
+ * .setRetrySettings(
+ * cssProductsServiceSettingsBuilder
+ * .getCssProductSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CssProductsServiceSettings cssProductsServiceSettings =
+ * cssProductsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CssProductsServiceSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountsServiceClient accountsServiceClient = AccountsServiceClient.create()) {
+ * AccountName name = AccountName.of("[ACCOUNT]");
+ * Account response = accountsServiceClient.getAccount(name);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AccountLabelsServiceClient accountLabelsServiceClient =
+ * AccountLabelsServiceClient.create()) {
+ * AccountName parent = AccountName.of("[ACCOUNT]");
+ * AccountLabel accountLabel = AccountLabel.newBuilder().build();
+ * AccountLabel response = accountLabelsServiceClient.createAccountLabel(parent, accountLabel);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductInputsServiceClient cssProductInputsServiceClient =
+ * CssProductInputsServiceClient.create()) {
+ * InsertCssProductInputRequest request =
+ * InsertCssProductInputRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setCssProductInput(CssProductInput.newBuilder().build())
+ * .setFeedId(-976011428)
+ * .build();
+ * CssProductInput response = cssProductInputsServiceClient.insertCssProductInput(request);
+ * }
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CssProductsServiceClient cssProductsServiceClient = CssProductsServiceClient.create()) {
+ * CssProductName name = CssProductName.of("[ACCOUNT]", "[CSS_PRODUCT]");
+ * CssProduct response = cssProductsServiceClient.getCssProduct(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.shopping.css.v1;
+
+import javax.annotation.Generated;
diff --git a/java-shopping-css/google-shopping-css/src/main/java/com/google/shopping/css/v1/stub/AccountLabelsServiceStub.java b/java-shopping-css/google-shopping-css/src/main/java/com/google/shopping/css/v1/stub/AccountLabelsServiceStub.java
new file mode 100644
index 000000000000..a4ef5d89be73
--- /dev/null
+++ b/java-shopping-css/google-shopping-css/src/main/java/com/google/shopping/css/v1/stub/AccountLabelsServiceStub.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.shopping.css.v1.stub;
+
+import static com.google.shopping.css.v1.AccountLabelsServiceClient.ListAccountLabelsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.protobuf.Empty;
+import com.google.shopping.css.v1.AccountLabel;
+import com.google.shopping.css.v1.CreateAccountLabelRequest;
+import com.google.shopping.css.v1.DeleteAccountLabelRequest;
+import com.google.shopping.css.v1.ListAccountLabelsRequest;
+import com.google.shopping.css.v1.ListAccountLabelsResponse;
+import com.google.shopping.css.v1.UpdateAccountLabelRequest;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AccountLabelsService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountLabelsServiceStubSettings.Builder accountLabelsServiceSettingsBuilder =
+ * AccountLabelsServiceStubSettings.newBuilder();
+ * accountLabelsServiceSettingsBuilder
+ * .createAccountLabelSettings()
+ * .setRetrySettings(
+ * accountLabelsServiceSettingsBuilder
+ * .createAccountLabelSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AccountLabelsServiceStubSettings accountLabelsServiceSettings =
+ * accountLabelsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AccountLabelsServiceStubSettings
+ extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AccountsServiceStubSettings.Builder accountsServiceSettingsBuilder =
+ * AccountsServiceStubSettings.newBuilder();
+ * accountsServiceSettingsBuilder
+ * .getAccountSettings()
+ * .setRetrySettings(
+ * accountsServiceSettingsBuilder
+ * .getAccountSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AccountsServiceStubSettings accountsServiceSettings = accountsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AccountsServiceStubSettings extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductInputsServiceStubSettings.Builder cssProductInputsServiceSettingsBuilder =
+ * CssProductInputsServiceStubSettings.newBuilder();
+ * cssProductInputsServiceSettingsBuilder
+ * .insertCssProductInputSettings()
+ * .setRetrySettings(
+ * cssProductInputsServiceSettingsBuilder
+ * .insertCssProductInputSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CssProductInputsServiceStubSettings cssProductInputsServiceSettings =
+ * cssProductInputsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CssProductInputsServiceStubSettings
+ extends StubSettings
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CssProductsServiceStubSettings.Builder cssProductsServiceSettingsBuilder =
+ * CssProductsServiceStubSettings.newBuilder();
+ * cssProductsServiceSettingsBuilder
+ * .getCssProductSettings()
+ * .setRetrySettings(
+ * cssProductsServiceSettingsBuilder
+ * .getCssProductSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CssProductsServiceStubSettings cssProductsServiceSettings =
+ * cssProductsServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CssProductsServiceStubSettings extends StubSettings