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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Service response = commerceTransactionClient.getService(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the CommerceTransactionClient 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 | + *
|---|---|---|
ListServices |
+ * Lists Services in a given project and location. |
+ *
+ * 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. + *
|
+ *
GetService |
+ * Gets details of a single Service. |
+ *
+ * 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. + *
|
+ *
ListPrivateOffers |
+ * Lists PrivateOffers for the given parent. |
+ *
+ * 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. + *
|
+ *
GetPrivateOffer |
+ * Gets details of a single PrivateOffer. |
+ *
+ * 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. + *
|
+ *
CreatePrivateOffer |
+ * Creates a new PrivateOffer in a given project and location. |
+ *
+ * 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. + *
|
+ *
UpdatePrivateOffer |
+ * Updates the target PrivateOffer. |
+ *
+ * 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. + *
|
+ *
PublishPrivateOffer |
+ * Publishes the target PrivateOffer. |
+ *
+ * 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. + *
|
+ *
CancelPrivateOffer |
+ * Cancels the target PrivateOffer. |
+ *
+ * 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. + *
|
+ *
DeletePrivateOffer |
+ * Deletes the target PrivateOffer. |
+ *
+ * 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. + *
|
+ *
ListPrivateOfferDocuments |
+ * Lists PrivateOfferDocuments for the given parent. |
+ *
+ * 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. + *
|
+ *
GetPrivateOfferDocument |
+ * Gets details of a single PrivateOfferDocument. |
+ *
+ * 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. + *
|
+ *
CreatePrivateOfferDocument |
+ * Creates a new PrivateOfferDocument in a given project and location. |
+ *
+ * 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. + *
|
+ *
UpdatePrivateOfferDocument |
+ * Updates the target PrivateOfferDocument. |
+ *
+ * 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. + *
|
+ *
DeletePrivateOfferDocument |
+ * Deletes the target PrivateOfferDocument. |
+ *
+ * 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. + *
|
+ *
ListStandardOffers |
+ * Lists StandardOffers for the given parent. |
+ *
+ * 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. + *
|
+ *
GetStandardOffer |
+ * Gets details of a single StandardOffer. |
+ *
+ * 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. + *
|
+ *
GetSku |
+ * Gets details of a single Sku. |
+ *
+ * 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. + *
|
+ *
ListSkus |
+ * Lists Skus for the given parent. |
+ *
+ * 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. + *
|
+ *
GetSkuGroup |
+ * Gets details of a single SkuGroup. |
+ *
+ * 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. + *
|
+ *
ListSkuGroups |
+ * Lists SkuGroups for the given parent. |
+ *
+ * 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. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. + * This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. + * For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
+ *
+ * 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. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * 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. + *
|
+ *
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 CommerceTransactionSettings 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
+ * CommerceTransactionSettings commerceTransactionSettings =
+ * CommerceTransactionSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * CommerceTransactionClient commerceTransactionClient =
+ * CommerceTransactionClient.create(commerceTransactionSettings);
+ * }
+ *
+ * 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
+ * CommerceTransactionSettings commerceTransactionSettings =
+ * CommerceTransactionSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CommerceTransactionClient commerceTransactionClient =
+ * CommerceTransactionClient.create(commerceTransactionSettings);
+ * }
+ *
+ * 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
+ * CommerceTransactionSettings commerceTransactionSettings =
+ * CommerceTransactionSettings.newHttpJsonBuilder().build();
+ * CommerceTransactionClient commerceTransactionClient =
+ * CommerceTransactionClient.create(commerceTransactionSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@BetaApi +@Generated("by gapic-generator-java") +public class CommerceTransactionClient implements BackgroundResource { + private final @Nullable CommerceTransactionSettings settings; + private final CommerceTransactionStub stub; + + /** Constructs an instance of CommerceTransactionClient with default settings. */ + public static final CommerceTransactionClient create() throws IOException { + return create(CommerceTransactionSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CommerceTransactionClient, 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 CommerceTransactionClient create(CommerceTransactionSettings settings) + throws IOException { + return new CommerceTransactionClient(settings); + } + + /** + * Constructs an instance of CommerceTransactionClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(CommerceTransactionSettings). + */ + public static final CommerceTransactionClient create(CommerceTransactionStub stub) { + return new CommerceTransactionClient(stub); + } + + /** + * Constructs an instance of CommerceTransactionClient, 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 CommerceTransactionClient(CommerceTransactionSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CommerceTransactionStubSettings) settings.getStubSettings()).createStub(); + } + + protected CommerceTransactionClient(CommerceTransactionStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable CommerceTransactionSettings getSettings() { + return settings; + } + + public CommerceTransactionStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Services in a given project and location. + * + *
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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Service element : commerceTransactionClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListServicesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(@Nullable LocationName parent) {
+ ListServicesRequest request =
+ ListServicesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Service element : commerceTransactionClient.listServices(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListServicesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListServicesPagedResponse listServices(String parent) {
+ ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build();
+ return listServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Service element : commerceTransactionClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) {
+ return listServicesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Services in a given project and location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listServicesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Service element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListServicesRequest request =
+ * ListServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListServicesResponse response =
+ * commerceTransactionClient.listServicesCallable().call(request);
+ * for (Service element : response.getServicesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Service response = commerceTransactionClient.getService(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(@Nullable ServiceName name) {
+ GetServiceRequest request =
+ GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * Service response = commerceTransactionClient.getService(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Service getService(String name) {
+ GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build();
+ return getService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setView(ServiceView.forNumber(0))
+ * .build();
+ * Service response = commerceTransactionClient.getService(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 Service getService(GetServiceRequest request) {
+ return getServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Service.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetServiceRequest request =
+ * GetServiceRequest.newBuilder()
+ * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setView(ServiceView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.getServiceCallable().futureCall(request);
+ * // Do something.
+ * Service response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (PrivateOffer element :
+ * commerceTransactionClient.listPrivateOffers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPrivateOffersRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPrivateOffersPagedResponse listPrivateOffers(@Nullable LocationName parent) {
+ ListPrivateOffersRequest request =
+ ListPrivateOffersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPrivateOffers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (PrivateOffer element :
+ * commerceTransactionClient.listPrivateOffers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPrivateOffersRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPrivateOffersPagedResponse listPrivateOffers(String parent) {
+ ListPrivateOffersRequest request =
+ ListPrivateOffersRequest.newBuilder().setParent(parent).build();
+ return listPrivateOffers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOffersRequest request =
+ * ListPrivateOffersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (PrivateOffer element :
+ * commerceTransactionClient.listPrivateOffers(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 ListPrivateOffersPagedResponse listPrivateOffers(ListPrivateOffersRequest request) {
+ return listPrivateOffersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOffersRequest request =
+ * ListPrivateOffersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listPrivateOffersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (PrivateOffer element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOffersRequest request =
+ * ListPrivateOffersRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListPrivateOffersResponse response =
+ * commerceTransactionClient.listPrivateOffersCallable().call(request);
+ * for (PrivateOffer element : response.getPrivateOffersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferName name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]");
+ * PrivateOffer response = commerceTransactionClient.getPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer getPrivateOffer(@Nullable PrivateOfferName name) {
+ GetPrivateOfferRequest request =
+ GetPrivateOfferRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString();
+ * PrivateOffer response = commerceTransactionClient.getPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer getPrivateOffer(String name) {
+ GetPrivateOfferRequest request = GetPrivateOfferRequest.newBuilder().setName(name).build();
+ return getPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetPrivateOfferRequest request =
+ * GetPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setView(PrivateOfferView.forNumber(0))
+ * .build();
+ * PrivateOffer response = commerceTransactionClient.getPrivateOffer(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 PrivateOffer getPrivateOffer(GetPrivateOfferRequest request) {
+ return getPrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetPrivateOfferRequest request =
+ * GetPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setView(PrivateOfferView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.getPrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * PrivateOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CreatePrivateOfferRequest request =
+ * CreatePrivateOfferRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPrivateOffer(PrivateOffer.newBuilder().build())
+ * .build();
+ * PrivateOffer response = commerceTransactionClient.createPrivateOffer(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 PrivateOffer createPrivateOffer(CreatePrivateOfferRequest request) {
+ return createPrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new PrivateOffer in a given project and location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CreatePrivateOfferRequest request =
+ * CreatePrivateOfferRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPrivateOffer(PrivateOffer.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.createPrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * PrivateOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOffer privateOffer = PrivateOffer.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PrivateOffer response =
+ * commerceTransactionClient.updatePrivateOffer(privateOffer, updateMask);
+ * }
+ * }
+ *
+ * @param privateOffer Required. The resource being updated
+ * @param updateMask Optional. The list of fields to update. The fields specified in the
+ * update_mask are relative to the resource, not the full request. A field will be overwritten
+ * if it is in the mask. The special value "*" means full replacement. If unspecified, all
+ * fields present in the request will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer updatePrivateOffer(PrivateOffer privateOffer, FieldMask updateMask) {
+ UpdatePrivateOfferRequest request =
+ UpdatePrivateOfferRequest.newBuilder()
+ .setPrivateOffer(privateOffer)
+ .setUpdateMask(updateMask)
+ .build();
+ return updatePrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * UpdatePrivateOfferRequest request =
+ * UpdatePrivateOfferRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPrivateOffer(PrivateOffer.newBuilder().build())
+ * .build();
+ * PrivateOffer response = commerceTransactionClient.updatePrivateOffer(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 PrivateOffer updatePrivateOffer(UpdatePrivateOfferRequest request) {
+ return updatePrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * UpdatePrivateOfferRequest request =
+ * UpdatePrivateOfferRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setPrivateOffer(PrivateOffer.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.updatePrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * PrivateOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferName name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]");
+ * PrivateOffer response = commerceTransactionClient.publishPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer publishPrivateOffer(@Nullable PrivateOfferName name) {
+ PublishPrivateOfferRequest request =
+ PublishPrivateOfferRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return publishPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Publishes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString();
+ * PrivateOffer response = commerceTransactionClient.publishPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer publishPrivateOffer(String name) {
+ PublishPrivateOfferRequest request =
+ PublishPrivateOfferRequest.newBuilder().setName(name).build();
+ return publishPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Publishes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PublishPrivateOfferRequest request =
+ * PublishPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setValidateOnly(true)
+ * .build();
+ * PrivateOffer response = commerceTransactionClient.publishPrivateOffer(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 PrivateOffer publishPrivateOffer(PublishPrivateOfferRequest request) {
+ return publishPrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Publishes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PublishPrivateOfferRequest request =
+ * PublishPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.publishPrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * PrivateOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferName name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]");
+ * PrivateOffer response = commerceTransactionClient.cancelPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer cancelPrivateOffer(@Nullable PrivateOfferName name) {
+ CancelPrivateOfferRequest request =
+ CancelPrivateOfferRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return cancelPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString();
+ * PrivateOffer response = commerceTransactionClient.cancelPrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOffer cancelPrivateOffer(String name) {
+ CancelPrivateOfferRequest request =
+ CancelPrivateOfferRequest.newBuilder().setName(name).build();
+ return cancelPrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CancelPrivateOfferRequest request =
+ * CancelPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setCancellationNote("cancellationNote806581141")
+ * .build();
+ * PrivateOffer response = commerceTransactionClient.cancelPrivateOffer(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 PrivateOffer cancelPrivateOffer(CancelPrivateOfferRequest request) {
+ return cancelPrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CancelPrivateOfferRequest request =
+ * CancelPrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setCancellationNote("cancellationNote806581141")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.cancelPrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * PrivateOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferName name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]");
+ * commerceTransactionClient.deletePrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePrivateOffer(@Nullable PrivateOfferName name) {
+ DeletePrivateOfferRequest request =
+ DeletePrivateOfferRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deletePrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString();
+ * commerceTransactionClient.deletePrivateOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePrivateOffer(String name) {
+ DeletePrivateOfferRequest request =
+ DeletePrivateOfferRequest.newBuilder().setName(name).build();
+ deletePrivateOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * DeletePrivateOfferRequest request =
+ * DeletePrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setForce(true)
+ * .build();
+ * commerceTransactionClient.deletePrivateOffer(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 deletePrivateOffer(DeletePrivateOfferRequest request) {
+ deletePrivateOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * DeletePrivateOfferRequest request =
+ * DeletePrivateOfferRequest.newBuilder()
+ * .setName(PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setForce(true)
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.deletePrivateOfferCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferName parent = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]");
+ * for (PrivateOfferDocument element :
+ * commerceTransactionClient.listPrivateOfferDocuments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPrivateOfferDocumentsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPrivateOfferDocumentsPagedResponse listPrivateOfferDocuments(
+ @Nullable PrivateOfferName parent) {
+ ListPrivateOfferDocumentsRequest request =
+ ListPrivateOfferDocumentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listPrivateOfferDocuments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOfferDocuments for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString();
+ * for (PrivateOfferDocument element :
+ * commerceTransactionClient.listPrivateOfferDocuments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListPrivateOfferDocumentsRequest.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPrivateOfferDocumentsPagedResponse listPrivateOfferDocuments(String parent) {
+ ListPrivateOfferDocumentsRequest request =
+ ListPrivateOfferDocumentsRequest.newBuilder().setParent(parent).build();
+ return listPrivateOfferDocuments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOfferDocuments for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOfferDocumentsRequest request =
+ * ListPrivateOfferDocumentsRequest.newBuilder()
+ * .setParent(
+ * PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (PrivateOfferDocument element :
+ * commerceTransactionClient.listPrivateOfferDocuments(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 ListPrivateOfferDocumentsPagedResponse listPrivateOfferDocuments(
+ ListPrivateOfferDocumentsRequest request) {
+ return listPrivateOfferDocumentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOfferDocuments for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOfferDocumentsRequest request =
+ * ListPrivateOfferDocumentsRequest.newBuilder()
+ * .setParent(
+ * PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listPrivateOfferDocumentsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (PrivateOfferDocument element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListPrivateOfferDocumentsRequest, ListPrivateOfferDocumentsPagedResponse>
+ listPrivateOfferDocumentsPagedCallable() {
+ return stub.listPrivateOfferDocumentsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists PrivateOfferDocuments for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListPrivateOfferDocumentsRequest request =
+ * ListPrivateOfferDocumentsRequest.newBuilder()
+ * .setParent(
+ * PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListPrivateOfferDocumentsResponse response =
+ * commerceTransactionClient.listPrivateOfferDocumentsCallable().call(request);
+ * for (PrivateOfferDocument element : response.getPrivateOfferDocumentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferDocumentName name =
+ * PrivateOfferDocumentName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]");
+ * PrivateOfferDocument response = commerceTransactionClient.getPrivateOfferDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOfferDocument getPrivateOfferDocument(
+ @Nullable PrivateOfferDocumentName name) {
+ GetPrivateOfferDocumentRequest request =
+ GetPrivateOfferDocumentRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getPrivateOfferDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name =
+ * PrivateOfferDocumentName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString();
+ * PrivateOfferDocument response = commerceTransactionClient.getPrivateOfferDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOfferDocument getPrivateOfferDocument(String name) {
+ GetPrivateOfferDocumentRequest request =
+ GetPrivateOfferDocumentRequest.newBuilder().setName(name).build();
+ return getPrivateOfferDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetPrivateOfferDocumentRequest request =
+ * GetPrivateOfferDocumentRequest.newBuilder()
+ * .setName(
+ * PrivateOfferDocumentName.of(
+ * "[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * PrivateOfferDocument response = commerceTransactionClient.getPrivateOfferDocument(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 PrivateOfferDocument getPrivateOfferDocument(
+ GetPrivateOfferDocumentRequest request) {
+ return getPrivateOfferDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetPrivateOfferDocumentRequest request =
+ * GetPrivateOfferDocumentRequest.newBuilder()
+ * .setName(
+ * PrivateOfferDocumentName.of(
+ * "[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.getPrivateOfferDocumentCallable().futureCall(request);
+ * // Do something.
+ * PrivateOfferDocument response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CreatePrivateOfferDocumentRequest request =
+ * CreatePrivateOfferDocumentRequest.newBuilder()
+ * .setParent(
+ * PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setPrivateOfferDocument(PrivateOfferDocument.newBuilder().build())
+ * .build();
+ * PrivateOfferDocument response = commerceTransactionClient.createPrivateOfferDocument(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 PrivateOfferDocument createPrivateOfferDocument(
+ CreatePrivateOfferDocumentRequest request) {
+ return createPrivateOfferDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new PrivateOfferDocument in a given project and location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * CreatePrivateOfferDocumentRequest request =
+ * CreatePrivateOfferDocumentRequest.newBuilder()
+ * .setParent(
+ * PrivateOfferName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]").toString())
+ * .setPrivateOfferDocument(PrivateOfferDocument.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.createPrivateOfferDocumentCallable().futureCall(request);
+ * // Do something.
+ * PrivateOfferDocument response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferDocument privateOfferDocument = PrivateOfferDocument.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * PrivateOfferDocument response =
+ * commerceTransactionClient.updatePrivateOfferDocument(privateOfferDocument, updateMask);
+ * }
+ * }
+ *
+ * @param privateOfferDocument Required. The resource being updated.
+ * @param updateMask Optional. The list of fields to update. The fields specified in the
+ * update_mask are relative to the resource, not the full request. A field will be overwritten
+ * if it is in the mask. The special value "*" means full replacement. If unspecified, all
+ * fields present in the request will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final PrivateOfferDocument updatePrivateOfferDocument(
+ PrivateOfferDocument privateOfferDocument, FieldMask updateMask) {
+ UpdatePrivateOfferDocumentRequest request =
+ UpdatePrivateOfferDocumentRequest.newBuilder()
+ .setPrivateOfferDocument(privateOfferDocument)
+ .setUpdateMask(updateMask)
+ .build();
+ return updatePrivateOfferDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the target PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * UpdatePrivateOfferDocumentRequest request =
+ * UpdatePrivateOfferDocumentRequest.newBuilder()
+ * .setPrivateOfferDocument(PrivateOfferDocument.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * PrivateOfferDocument response = commerceTransactionClient.updatePrivateOfferDocument(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 PrivateOfferDocument updatePrivateOfferDocument(
+ UpdatePrivateOfferDocumentRequest request) {
+ return updatePrivateOfferDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the target PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * UpdatePrivateOfferDocumentRequest request =
+ * UpdatePrivateOfferDocumentRequest.newBuilder()
+ * .setPrivateOfferDocument(PrivateOfferDocument.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.updatePrivateOfferDocumentCallable().futureCall(request);
+ * // Do something.
+ * PrivateOfferDocument response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * PrivateOfferDocumentName name =
+ * PrivateOfferDocumentName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]");
+ * commerceTransactionClient.deletePrivateOfferDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePrivateOfferDocument(@Nullable PrivateOfferDocumentName name) {
+ DeletePrivateOfferDocumentRequest request =
+ DeletePrivateOfferDocumentRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deletePrivateOfferDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name =
+ * PrivateOfferDocumentName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString();
+ * commerceTransactionClient.deletePrivateOfferDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePrivateOfferDocument(String name) {
+ DeletePrivateOfferDocumentRequest request =
+ DeletePrivateOfferDocumentRequest.newBuilder().setName(name).build();
+ deletePrivateOfferDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * DeletePrivateOfferDocumentRequest request =
+ * DeletePrivateOfferDocumentRequest.newBuilder()
+ * .setName(
+ * PrivateOfferDocumentName.of(
+ * "[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * commerceTransactionClient.deletePrivateOfferDocument(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 deletePrivateOfferDocument(DeletePrivateOfferDocumentRequest request) {
+ deletePrivateOfferDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the target PrivateOfferDocument.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * DeletePrivateOfferDocumentRequest request =
+ * DeletePrivateOfferDocumentRequest.newBuilder()
+ * .setName(
+ * PrivateOfferDocumentName.of(
+ * "[PROJECT]", "[LOCATION]", "[PRIVATE_OFFER]", "[DOCUMENT]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.deletePrivateOfferDocumentCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * for (StandardOffer element :
+ * commerceTransactionClient.listStandardOffers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListStandardOffersRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListStandardOffersPagedResponse listStandardOffers(@Nullable ServiceName parent) {
+ ListStandardOffersRequest request =
+ ListStandardOffersRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listStandardOffers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StandardOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * for (StandardOffer element :
+ * commerceTransactionClient.listStandardOffers(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListStandardOffersRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListStandardOffersPagedResponse listStandardOffers(String parent) {
+ ListStandardOffersRequest request =
+ ListStandardOffersRequest.newBuilder().setParent(parent).build();
+ return listStandardOffers(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StandardOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListStandardOffersRequest request =
+ * ListStandardOffersRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (StandardOffer element :
+ * commerceTransactionClient.listStandardOffers(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 ListStandardOffersPagedResponse listStandardOffers(
+ ListStandardOffersRequest request) {
+ return listStandardOffersPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists StandardOffers for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListStandardOffersRequest request =
+ * ListStandardOffersRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listStandardOffersPagedCallable().futureCall(request);
+ * // Do something.
+ * for (StandardOffer element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListStandardOffersRequest request =
+ * ListStandardOffersRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListStandardOffersResponse response =
+ * commerceTransactionClient.listStandardOffersCallable().call(request);
+ * for (StandardOffer element : response.getStandardOffersList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * StandardOfferName name =
+ * StandardOfferName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[STANDARD_OFFER]");
+ * StandardOffer response = commerceTransactionClient.getStandardOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StandardOffer getStandardOffer(@Nullable StandardOfferName name) {
+ GetStandardOfferRequest request =
+ GetStandardOfferRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getStandardOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single StandardOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name =
+ * StandardOfferName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[STANDARD_OFFER]")
+ * .toString();
+ * StandardOffer response = commerceTransactionClient.getStandardOffer(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final StandardOffer getStandardOffer(String name) {
+ GetStandardOfferRequest request = GetStandardOfferRequest.newBuilder().setName(name).build();
+ return getStandardOffer(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single StandardOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetStandardOfferRequest request =
+ * GetStandardOfferRequest.newBuilder()
+ * .setName(
+ * StandardOfferName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[STANDARD_OFFER]")
+ * .toString())
+ * .setView(StandardOfferView.forNumber(0))
+ * .build();
+ * StandardOffer response = commerceTransactionClient.getStandardOffer(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 StandardOffer getStandardOffer(GetStandardOfferRequest request) {
+ return getStandardOfferCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single StandardOffer.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetStandardOfferRequest request =
+ * GetStandardOfferRequest.newBuilder()
+ * .setName(
+ * StandardOfferName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[STANDARD_OFFER]")
+ * .toString())
+ * .setView(StandardOfferView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.getStandardOfferCallable().futureCall(request);
+ * // Do something.
+ * StandardOffer response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[SKU]");
+ * Sku response = commerceTransactionClient.getSku(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Sku getSku(@Nullable SkuName name) {
+ GetSkuRequest request =
+ GetSkuRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSku(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Sku.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = SkuName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[SKU]").toString();
+ * Sku response = commerceTransactionClient.getSku(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Sku getSku(String name) {
+ GetSkuRequest request = GetSkuRequest.newBuilder().setName(name).build();
+ return getSku(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Sku.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetSkuRequest request =
+ * GetSkuRequest.newBuilder()
+ * .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[SKU]").toString())
+ * .build();
+ * Sku response = commerceTransactionClient.getSku(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 Sku getSku(GetSkuRequest request) {
+ return getSkuCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Sku.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetSkuRequest request =
+ * GetSkuRequest.newBuilder()
+ * .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[SKU]").toString())
+ * .build();
+ * ApiFuture future = commerceTransactionClient.getSkuCallable().futureCall(request);
+ * // Do something.
+ * Sku response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * for (Sku element : commerceTransactionClient.listSkus(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListSkusRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkusPagedResponse listSkus(@Nullable ServiceName parent) {
+ ListSkusRequest request =
+ ListSkusRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSkus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Skus for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
+ * for (Sku element : commerceTransactionClient.listSkus(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListSkusRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkusPagedResponse listSkus(String parent) {
+ ListSkusRequest request = ListSkusRequest.newBuilder().setParent(parent).build();
+ return listSkus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Skus for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Sku element : commerceTransactionClient.listSkus(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 ListSkusPagedResponse listSkus(ListSkusRequest request) {
+ return listSkusPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Skus for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future = commerceTransactionClient.listSkusPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Sku element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListSkusResponse response = commerceTransactionClient.listSkusCallable().call(request);
+ * for (Sku element : response.getSkusList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * SkuGroupName name = SkuGroupName.of("[PROJECT]", "[LOCATION]", "[SKU_GROUP]");
+ * SkuGroup response = commerceTransactionClient.getSkuGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SkuGroup getSkuGroup(@Nullable SkuGroupName name) {
+ GetSkuGroupRequest request =
+ GetSkuGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSkuGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single SkuGroup.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String name = SkuGroupName.of("[PROJECT]", "[LOCATION]", "[SKU_GROUP]").toString();
+ * SkuGroup response = commerceTransactionClient.getSkuGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SkuGroup getSkuGroup(String name) {
+ GetSkuGroupRequest request = GetSkuGroupRequest.newBuilder().setName(name).build();
+ return getSkuGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single SkuGroup.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetSkuGroupRequest request =
+ * GetSkuGroupRequest.newBuilder()
+ * .setName(SkuGroupName.of("[PROJECT]", "[LOCATION]", "[SKU_GROUP]").toString())
+ * .build();
+ * SkuGroup response = commerceTransactionClient.getSkuGroup(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 SkuGroup getSkuGroup(GetSkuGroupRequest request) {
+ return getSkuGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single SkuGroup.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetSkuGroupRequest request =
+ * GetSkuGroupRequest.newBuilder()
+ * .setName(SkuGroupName.of("[PROJECT]", "[LOCATION]", "[SKU_GROUP]").toString())
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.getSkuGroupCallable().futureCall(request);
+ * // Do something.
+ * SkuGroup response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (SkuGroup element : commerceTransactionClient.listSkuGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListSkuGroupsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkuGroupsPagedResponse listSkuGroups(@Nullable LocationName parent) {
+ ListSkuGroupsRequest request =
+ ListSkuGroupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSkuGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SkuGroups for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (SkuGroup element : commerceTransactionClient.listSkuGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListSkuGroupsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkuGroupsPagedResponse listSkuGroups(String parent) {
+ ListSkuGroupsRequest request = ListSkuGroupsRequest.newBuilder().setParent(parent).build();
+ return listSkuGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SkuGroups for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkuGroupsRequest request =
+ * ListSkuGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (SkuGroup element : commerceTransactionClient.listSkuGroups(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 ListSkuGroupsPagedResponse listSkuGroups(ListSkuGroupsRequest request) {
+ return listSkuGroupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SkuGroups for the given parent.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkuGroupsRequest request =
+ * ListSkuGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listSkuGroupsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SkuGroup element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListSkuGroupsRequest request =
+ * ListSkuGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListSkuGroupsResponse response =
+ * commerceTransactionClient.listSkuGroupsCallable().call(request);
+ * for (SkuGroup element : response.getSkuGroupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableThis method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : commerceTransactionClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * This method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * commerceTransactionClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableThis method lists locations based on the resource scope provided inthe + * [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: + * ***Global locations**: If `name` is empty, the method lists thepublic + * locations available to all projects. * **Project-specificlocations**: If + * `name` follows the format`projects/{project}`, the method lists locations visible to + * thatspecific project. This includes public, private, or otherproject-specific locations enabled + * for the project. + * + *
For gRPC and client library implementations, the resource name ispassed as the `name` field. + * For direct service calls, the resourcename isincorporated into the request path based on the + * specific serviceimplementation and version. + * + *
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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * commerceTransactionClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = commerceTransactionClient.getLocation(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 Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * 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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * commerceTransactionClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe 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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getService: + * + *
{@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
+ * CommerceTransactionSettings.Builder commerceTransactionSettingsBuilder =
+ * CommerceTransactionSettings.newBuilder();
+ * commerceTransactionSettingsBuilder
+ * .getServiceSettings()
+ * .setRetrySettings(
+ * commerceTransactionSettingsBuilder
+ * .getServiceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * CommerceTransactionSettings commerceTransactionSettings =
+ * commerceTransactionSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public class CommerceTransactionSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= CommerceTransactionClient =======================
+ *
+ * Service Description: APIs related to managing resources that model commercial transactions.
+ *
+ * Sample for CommerceTransactionClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class CommerceTransactionStub 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
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getService:
+ *
+ * {@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 (CommerceTransactionClient commerceTransactionClient = CommerceTransactionClient.create()) {
+ * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
+ * Service response = commerceTransactionClient.getService(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.commerceproducer.v1beta;
+
+import javax.annotation.Generated;
diff --git a/java-commerceproducer/google-cloud-commerceproducer/src/main/java/com/google/cloud/commerceproducer/v1beta/stub/CommerceTransactionStub.java b/java-commerceproducer/google-cloud-commerceproducer/src/main/java/com/google/cloud/commerceproducer/v1beta/stub/CommerceTransactionStub.java
new file mode 100644
index 000000000000..fb7464b8a9cf
--- /dev/null
+++ b/java-commerceproducer/google-cloud-commerceproducer/src/main/java/com/google/cloud/commerceproducer/v1beta/stub/CommerceTransactionStub.java
@@ -0,0 +1,215 @@
+/*
+ * Copyright 2026 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.cloud.commerceproducer.v1beta.stub;
+
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListLocationsPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListPrivateOfferDocumentsPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListPrivateOffersPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListServicesPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListSkuGroupsPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListSkusPagedResponse;
+import static com.google.cloud.commerceproducer.v1beta.CommerceTransactionClient.ListStandardOffersPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.commerceproducer.v1beta.CancelPrivateOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.CreatePrivateOfferDocumentRequest;
+import com.google.cloud.commerceproducer.v1beta.CreatePrivateOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.DeletePrivateOfferDocumentRequest;
+import com.google.cloud.commerceproducer.v1beta.DeletePrivateOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.GetPrivateOfferDocumentRequest;
+import com.google.cloud.commerceproducer.v1beta.GetPrivateOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.GetServiceRequest;
+import com.google.cloud.commerceproducer.v1beta.GetSkuGroupRequest;
+import com.google.cloud.commerceproducer.v1beta.GetSkuRequest;
+import com.google.cloud.commerceproducer.v1beta.GetStandardOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.ListPrivateOfferDocumentsRequest;
+import com.google.cloud.commerceproducer.v1beta.ListPrivateOfferDocumentsResponse;
+import com.google.cloud.commerceproducer.v1beta.ListPrivateOffersRequest;
+import com.google.cloud.commerceproducer.v1beta.ListPrivateOffersResponse;
+import com.google.cloud.commerceproducer.v1beta.ListServicesRequest;
+import com.google.cloud.commerceproducer.v1beta.ListServicesResponse;
+import com.google.cloud.commerceproducer.v1beta.ListSkuGroupsRequest;
+import com.google.cloud.commerceproducer.v1beta.ListSkuGroupsResponse;
+import com.google.cloud.commerceproducer.v1beta.ListSkusRequest;
+import com.google.cloud.commerceproducer.v1beta.ListSkusResponse;
+import com.google.cloud.commerceproducer.v1beta.ListStandardOffersRequest;
+import com.google.cloud.commerceproducer.v1beta.ListStandardOffersResponse;
+import com.google.cloud.commerceproducer.v1beta.PrivateOffer;
+import com.google.cloud.commerceproducer.v1beta.PrivateOfferDocument;
+import com.google.cloud.commerceproducer.v1beta.PublishPrivateOfferRequest;
+import com.google.cloud.commerceproducer.v1beta.Service;
+import com.google.cloud.commerceproducer.v1beta.Sku;
+import com.google.cloud.commerceproducer.v1beta.SkuGroup;
+import com.google.cloud.commerceproducer.v1beta.StandardOffer;
+import com.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferDocumentRequest;
+import com.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the CommerceTransaction 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
+ * CommerceTransactionStubSettings.Builder commerceTransactionSettingsBuilder =
+ * CommerceTransactionStubSettings.newBuilder();
+ * commerceTransactionSettingsBuilder
+ * .getServiceSettings()
+ * .setRetrySettings(
+ * commerceTransactionSettingsBuilder
+ * .getServiceSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * CommerceTransactionStubSettings commerceTransactionSettings =
+ * commerceTransactionSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@BetaApi
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class CommerceTransactionStubSettings extends StubSettings