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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * SaasName name = SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]");
+ * Saas response = saasDeploymentsClient.getSaas(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the SaasDeploymentsClient 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 | + *
|---|---|---|
ListSaas |
+ * Retrieve a collection of saas. |
+ *
+ * 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. + *
|
+ *
GetSaas |
+ * Retrieve a single saas. |
+ *
+ * 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. + *
|
+ *
CreateSaas |
+ * Create a new saas. |
+ *
+ * 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. + *
|
+ *
UpdateSaas |
+ * Update a single saas. |
+ *
+ * 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. + *
|
+ *
DeleteSaas |
+ * Delete a single saas. |
+ *
+ * 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. + *
|
+ *
ListTenants |
+ * Retrieve a collection of tenants. |
+ *
+ * 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. + *
|
+ *
GetTenant |
+ * Retrieve a single tenant. |
+ *
+ * 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. + *
|
+ *
CreateTenant |
+ * Create a new tenant. |
+ *
+ * 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. + *
|
+ *
UpdateTenant |
+ * Update a single tenant. |
+ *
+ * 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. + *
|
+ *
DeleteTenant |
+ * Delete a single tenant. |
+ *
+ * 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. + *
|
+ *
ListUnitKinds |
+ * Retrieve a collection of unit kinds. |
+ *
+ * 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. + *
|
+ *
GetUnitKind |
+ * Retrieve a single unit kind. |
+ *
+ * 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. + *
|
+ *
CreateUnitKind |
+ * Create a new unit kind. |
+ *
+ * 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. + *
|
+ *
UpdateUnitKind |
+ * Update a single unit kind. |
+ *
+ * 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. + *
|
+ *
DeleteUnitKind |
+ * Delete a single unit kind. |
+ *
+ * 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. + *
|
+ *
ListUnits |
+ * Retrieve a collection of units. |
+ *
+ * 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. + *
|
+ *
GetUnit |
+ * Retrieve a single unit. |
+ *
+ * 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. + *
|
+ *
CreateUnit |
+ * Create a new unit. |
+ *
+ * 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. + *
|
+ *
UpdateUnit |
+ * Update a single unit. |
+ *
+ * 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. + *
|
+ *
DeleteUnit |
+ * Delete a single unit. |
+ *
+ * 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. + *
|
+ *
ListUnitOperations |
+ * Retrieve a collection of unit operations. |
+ *
+ * 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. + *
|
+ *
GetUnitOperation |
+ * Retrieve a single unit operation. |
+ *
+ * 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. + *
|
+ *
CreateUnitOperation |
+ * Create a new unit operation. |
+ *
+ * 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. + *
|
+ *
UpdateUnitOperation |
+ * Update a single unit operation. |
+ *
+ * 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. + *
|
+ *
DeleteUnitOperation |
+ * Delete a single unit operation. |
+ *
+ * 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. + *
|
+ *
ListReleases |
+ * Retrieve a collection of releases. |
+ *
+ * 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. + *
|
+ *
GetRelease |
+ * Retrieve a single release. |
+ *
+ * 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. + *
|
+ *
CreateRelease |
+ * Create a new release. |
+ *
+ * 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. + *
|
+ *
UpdateRelease |
+ * Update a single release. |
+ *
+ * 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. + *
|
+ *
DeleteRelease |
+ * Delete a single release. |
+ *
+ * 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. |
+ *
+ * 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 SaasDeploymentsSettings 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
+ * SaasDeploymentsSettings saasDeploymentsSettings =
+ * SaasDeploymentsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SaasDeploymentsClient saasDeploymentsClient =
+ * SaasDeploymentsClient.create(saasDeploymentsSettings);
+ * }
+ *
+ * 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
+ * SaasDeploymentsSettings saasDeploymentsSettings =
+ * SaasDeploymentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SaasDeploymentsClient saasDeploymentsClient =
+ * SaasDeploymentsClient.create(saasDeploymentsSettings);
+ * }
+ *
+ * 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
+ * SaasDeploymentsSettings saasDeploymentsSettings =
+ * SaasDeploymentsSettings.newHttpJsonBuilder().build();
+ * SaasDeploymentsClient saasDeploymentsClient =
+ * SaasDeploymentsClient.create(saasDeploymentsSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class SaasDeploymentsClient implements BackgroundResource { + private final SaasDeploymentsSettings settings; + private final SaasDeploymentsStub stub; + + /** Constructs an instance of SaasDeploymentsClient with default settings. */ + public static final SaasDeploymentsClient create() throws IOException { + return create(SaasDeploymentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of SaasDeploymentsClient, 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 SaasDeploymentsClient create(SaasDeploymentsSettings settings) + throws IOException { + return new SaasDeploymentsClient(settings); + } + + /** + * Constructs an instance of SaasDeploymentsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(SaasDeploymentsSettings). + */ + public static final SaasDeploymentsClient create(SaasDeploymentsStub stub) { + return new SaasDeploymentsClient(stub); + } + + /** + * Constructs an instance of SaasDeploymentsClient, 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 SaasDeploymentsClient(SaasDeploymentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((SaasDeploymentsStubSettings) settings.getStubSettings()).createStub(); + } + + protected SaasDeploymentsClient(SaasDeploymentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final SaasDeploymentsSettings getSettings() { + return settings; + } + + public SaasDeploymentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieve a collection of saas. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Saas element : saasDeploymentsClient.listSaas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the saas.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSaasPagedResponse listSaas(LocationName parent) {
+ ListSaasRequest request =
+ ListSaasRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Saas element : saasDeploymentsClient.listSaas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the saas.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSaasPagedResponse listSaas(String parent) {
+ ListSaasRequest request = ListSaasRequest.newBuilder().setParent(parent).build();
+ return listSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListSaasRequest request =
+ * ListSaasRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Saas element : saasDeploymentsClient.listSaas(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 ListSaasPagedResponse listSaas(ListSaasRequest request) {
+ return listSaasPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListSaasRequest request =
+ * ListSaasRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.listSaasPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Saas 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListSaasRequest request =
+ * ListSaasRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSaasResponse response = saasDeploymentsClient.listSaasCallable().call(request);
+ * for (Saas element : response.getSaasList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * SaasName name = SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]");
+ * Saas response = saasDeploymentsClient.getSaas(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Saas getSaas(SaasName name) {
+ GetSaasRequest request =
+ GetSaasRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString();
+ * Saas response = saasDeploymentsClient.getSaas(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Saas getSaas(String name) {
+ GetSaasRequest request = GetSaasRequest.newBuilder().setName(name).build();
+ return getSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetSaasRequest request =
+ * GetSaasRequest.newBuilder()
+ * .setName(SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString())
+ * .build();
+ * Saas response = saasDeploymentsClient.getSaas(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 Saas getSaas(GetSaasRequest request) {
+ return getSaasCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetSaasRequest request =
+ * GetSaasRequest.newBuilder()
+ * .setName(SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.getSaasCallable().futureCall(request);
+ * // Do something.
+ * Saas 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Saas saas = Saas.newBuilder().build();
+ * String saasId = "saasId-910030789";
+ * Saas response = saasDeploymentsClient.createSaas(parent, saas, saasId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the saas.
+ * @param saas Required. The desired state for the saas.
+ * @param saasId Required. The ID value for the new saas.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Saas createSaas(LocationName parent, Saas saas, String saasId) {
+ CreateSaasRequest request =
+ CreateSaasRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setSaas(saas)
+ .setSaasId(saasId)
+ .build();
+ return createSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Saas saas = Saas.newBuilder().build();
+ * String saasId = "saasId-910030789";
+ * Saas response = saasDeploymentsClient.createSaas(parent, saas, saasId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the saas.
+ * @param saas Required. The desired state for the saas.
+ * @param saasId Required. The ID value for the new saas.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Saas createSaas(String parent, Saas saas, String saasId) {
+ CreateSaasRequest request =
+ CreateSaasRequest.newBuilder().setParent(parent).setSaas(saas).setSaasId(saasId).build();
+ return createSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateSaasRequest request =
+ * CreateSaasRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSaasId("saasId-910030789")
+ * .setSaas(Saas.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Saas response = saasDeploymentsClient.createSaas(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 Saas createSaas(CreateSaasRequest request) {
+ return createSaasCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateSaasRequest request =
+ * CreateSaasRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSaasId("saasId-910030789")
+ * .setSaas(Saas.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.createSaasCallable().futureCall(request);
+ * // Do something.
+ * Saas 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * Saas saas = Saas.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Saas response = saasDeploymentsClient.updateSaas(saas, updateMask);
+ * }
+ * }
+ *
+ * @param saas Required. The desired state for the saas.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the Saas
+ * resource by the 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. + *
If the user does not provide a mask then all fields in the Saas will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Saas updateSaas(Saas saas, FieldMask updateMask) { + UpdateSaasRequest request = + UpdateSaasRequest.newBuilder().setSaas(saas).setUpdateMask(updateMask).build(); + return updateSaas(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single saas. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateSaasRequest request =
+ * UpdateSaasRequest.newBuilder()
+ * .setSaas(Saas.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Saas response = saasDeploymentsClient.updateSaas(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 Saas updateSaas(UpdateSaasRequest request) {
+ return updateSaasCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateSaasRequest request =
+ * UpdateSaasRequest.newBuilder()
+ * .setSaas(Saas.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.updateSaasCallable().futureCall(request);
+ * // Do something.
+ * Saas 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * SaasName name = SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]");
+ * saasDeploymentsClient.deleteSaas(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSaas(SaasName name) {
+ DeleteSaasRequest request =
+ DeleteSaasRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString();
+ * saasDeploymentsClient.deleteSaas(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteSaas(String name) {
+ DeleteSaasRequest request = DeleteSaasRequest.newBuilder().setName(name).build();
+ deleteSaas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteSaasRequest request =
+ * DeleteSaasRequest.newBuilder()
+ * .setName(SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteSaas(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 deleteSaas(DeleteSaasRequest request) {
+ deleteSaasCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single saas.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteSaasRequest request =
+ * DeleteSaasRequest.newBuilder()
+ * .setName(SaasName.of("[PROJECT]", "[LOCATION]", "[SAAS]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.deleteSaasCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Tenant element : saasDeploymentsClient.listTenants(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the tenant.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTenantsPagedResponse listTenants(LocationName parent) {
+ ListTenantsRequest request =
+ ListTenantsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listTenants(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of tenants.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Tenant element : saasDeploymentsClient.listTenants(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the tenant.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListTenantsPagedResponse listTenants(String parent) {
+ ListTenantsRequest request = ListTenantsRequest.newBuilder().setParent(parent).build();
+ return listTenants(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of tenants.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListTenantsRequest request =
+ * ListTenantsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Tenant element : saasDeploymentsClient.listTenants(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 ListTenantsPagedResponse listTenants(ListTenantsRequest request) {
+ return listTenantsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of tenants.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListTenantsRequest request =
+ * ListTenantsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.listTenantsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Tenant 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListTenantsRequest request =
+ * ListTenantsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListTenantsResponse response = saasDeploymentsClient.listTenantsCallable().call(request);
+ * for (Tenant element : response.getTenantsList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * TenantName name = TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]");
+ * Tenant response = saasDeploymentsClient.getTenant(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Tenant getTenant(TenantName name) {
+ GetTenantRequest request =
+ GetTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString();
+ * Tenant response = saasDeploymentsClient.getTenant(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Tenant getTenant(String name) {
+ GetTenantRequest request = GetTenantRequest.newBuilder().setName(name).build();
+ return getTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetTenantRequest request =
+ * GetTenantRequest.newBuilder()
+ * .setName(TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString())
+ * .build();
+ * Tenant response = saasDeploymentsClient.getTenant(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 Tenant getTenant(GetTenantRequest request) {
+ return getTenantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetTenantRequest request =
+ * GetTenantRequest.newBuilder()
+ * .setName(TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.getTenantCallable().futureCall(request);
+ * // Do something.
+ * Tenant 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Tenant tenant = Tenant.newBuilder().build();
+ * String tenantId = "tenantId-1306693787";
+ * Tenant response = saasDeploymentsClient.createTenant(parent, tenant, tenantId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the tenant.
+ * @param tenant Required. The desired state for the tenant.
+ * @param tenantId Required. The ID value for the new tenant.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Tenant createTenant(LocationName parent, Tenant tenant, String tenantId) {
+ CreateTenantRequest request =
+ CreateTenantRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setTenant(tenant)
+ .setTenantId(tenantId)
+ .build();
+ return createTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Tenant tenant = Tenant.newBuilder().build();
+ * String tenantId = "tenantId-1306693787";
+ * Tenant response = saasDeploymentsClient.createTenant(parent, tenant, tenantId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the tenant.
+ * @param tenant Required. The desired state for the tenant.
+ * @param tenantId Required. The ID value for the new tenant.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Tenant createTenant(String parent, Tenant tenant, String tenantId) {
+ CreateTenantRequest request =
+ CreateTenantRequest.newBuilder()
+ .setParent(parent)
+ .setTenant(tenant)
+ .setTenantId(tenantId)
+ .build();
+ return createTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateTenantRequest request =
+ * CreateTenantRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTenantId("tenantId-1306693787")
+ * .setTenant(Tenant.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Tenant response = saasDeploymentsClient.createTenant(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 Tenant createTenant(CreateTenantRequest request) {
+ return createTenantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateTenantRequest request =
+ * CreateTenantRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setTenantId("tenantId-1306693787")
+ * .setTenant(Tenant.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.createTenantCallable().futureCall(request);
+ * // Do something.
+ * Tenant 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * Tenant tenant = Tenant.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Tenant response = saasDeploymentsClient.updateTenant(tenant, updateMask);
+ * }
+ * }
+ *
+ * @param tenant Required. The desired state for the tenant.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the Tenant
+ * resource by the 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. + *
If the user does not provide a mask then all fields in the Tenant will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tenant updateTenant(Tenant tenant, FieldMask updateMask) { + UpdateTenantRequest request = + UpdateTenantRequest.newBuilder().setTenant(tenant).setUpdateMask(updateMask).build(); + return updateTenant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single tenant. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateTenantRequest request =
+ * UpdateTenantRequest.newBuilder()
+ * .setTenant(Tenant.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Tenant response = saasDeploymentsClient.updateTenant(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 Tenant updateTenant(UpdateTenantRequest request) {
+ return updateTenantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateTenantRequest request =
+ * UpdateTenantRequest.newBuilder()
+ * .setTenant(Tenant.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.updateTenantCallable().futureCall(request);
+ * // Do something.
+ * Tenant 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * TenantName name = TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]");
+ * saasDeploymentsClient.deleteTenant(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteTenant(TenantName name) {
+ DeleteTenantRequest request =
+ DeleteTenantRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString();
+ * saasDeploymentsClient.deleteTenant(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteTenant(String name) {
+ DeleteTenantRequest request = DeleteTenantRequest.newBuilder().setName(name).build();
+ deleteTenant(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteTenantRequest request =
+ * DeleteTenantRequest.newBuilder()
+ * .setName(TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteTenant(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 deleteTenant(DeleteTenantRequest request) {
+ deleteTenantCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single tenant.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteTenantRequest request =
+ * DeleteTenantRequest.newBuilder()
+ * .setName(TenantName.of("[PROJECT]", "[LOCATION]", "[TENANT]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.deleteTenantCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (UnitKind element : saasDeploymentsClient.listUnitKinds(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitKindsPagedResponse listUnitKinds(LocationName parent) {
+ ListUnitKindsRequest request =
+ ListUnitKindsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listUnitKinds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit kinds.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (UnitKind element : saasDeploymentsClient.listUnitKinds(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitKindsPagedResponse listUnitKinds(String parent) {
+ ListUnitKindsRequest request = ListUnitKindsRequest.newBuilder().setParent(parent).build();
+ return listUnitKinds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit kinds.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitKindsRequest request =
+ * ListUnitKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (UnitKind element : saasDeploymentsClient.listUnitKinds(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 ListUnitKindsPagedResponse listUnitKinds(ListUnitKindsRequest request) {
+ return listUnitKindsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit kinds.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitKindsRequest request =
+ * ListUnitKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.listUnitKindsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (UnitKind 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitKindsRequest request =
+ * ListUnitKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListUnitKindsResponse response =
+ * saasDeploymentsClient.listUnitKindsCallable().call(request);
+ * for (UnitKind element : response.getUnitKindsList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitKindName name = UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]");
+ * UnitKind response = saasDeploymentsClient.getUnitKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitKind getUnitKind(UnitKindName name) {
+ GetUnitKindRequest request =
+ GetUnitKindRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString();
+ * UnitKind response = saasDeploymentsClient.getUnitKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitKind getUnitKind(String name) {
+ GetUnitKindRequest request = GetUnitKindRequest.newBuilder().setName(name).build();
+ return getUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitKindRequest request =
+ * GetUnitKindRequest.newBuilder()
+ * .setName(UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString())
+ * .build();
+ * UnitKind response = saasDeploymentsClient.getUnitKind(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 UnitKind getUnitKind(GetUnitKindRequest request) {
+ return getUnitKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitKindRequest request =
+ * GetUnitKindRequest.newBuilder()
+ * .setName(UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.getUnitKindCallable().futureCall(request);
+ * // Do something.
+ * UnitKind 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * UnitKind unitKind = UnitKind.newBuilder().build();
+ * String unitKindId = "unitKindId1956463219";
+ * UnitKind response = saasDeploymentsClient.createUnitKind(parent, unitKind, unitKindId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit kind.
+ * @param unitKind Required. The desired state for the unit kind.
+ * @param unitKindId Required. The ID value for the new unit kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitKind createUnitKind(LocationName parent, UnitKind unitKind, String unitKindId) {
+ CreateUnitKindRequest request =
+ CreateUnitKindRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUnitKind(unitKind)
+ .setUnitKindId(unitKindId)
+ .build();
+ return createUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * UnitKind unitKind = UnitKind.newBuilder().build();
+ * String unitKindId = "unitKindId1956463219";
+ * UnitKind response = saasDeploymentsClient.createUnitKind(parent, unitKind, unitKindId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit kind.
+ * @param unitKind Required. The desired state for the unit kind.
+ * @param unitKindId Required. The ID value for the new unit kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitKind createUnitKind(String parent, UnitKind unitKind, String unitKindId) {
+ CreateUnitKindRequest request =
+ CreateUnitKindRequest.newBuilder()
+ .setParent(parent)
+ .setUnitKind(unitKind)
+ .setUnitKindId(unitKindId)
+ .build();
+ return createUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitKindRequest request =
+ * CreateUnitKindRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitKindId("unitKindId1956463219")
+ * .setUnitKind(UnitKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * UnitKind response = saasDeploymentsClient.createUnitKind(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 UnitKind createUnitKind(CreateUnitKindRequest request) {
+ return createUnitKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitKindRequest request =
+ * CreateUnitKindRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitKindId("unitKindId1956463219")
+ * .setUnitKind(UnitKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.createUnitKindCallable().futureCall(request);
+ * // Do something.
+ * UnitKind 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitKind unitKind = UnitKind.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UnitKind response = saasDeploymentsClient.updateUnitKind(unitKind, updateMask);
+ * }
+ * }
+ *
+ * @param unitKind Required. The desired state for the unit kind.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the UnitKind
+ * resource by the 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. + *
If the user does not provide a mask then all fields in the UnitKind will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UnitKind updateUnitKind(UnitKind unitKind, FieldMask updateMask) { + UpdateUnitKindRequest request = + UpdateUnitKindRequest.newBuilder().setUnitKind(unitKind).setUpdateMask(updateMask).build(); + return updateUnitKind(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single unit kind. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitKindRequest request =
+ * UpdateUnitKindRequest.newBuilder()
+ * .setUnitKind(UnitKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * UnitKind response = saasDeploymentsClient.updateUnitKind(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 UnitKind updateUnitKind(UpdateUnitKindRequest request) {
+ return updateUnitKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitKindRequest request =
+ * UpdateUnitKindRequest.newBuilder()
+ * .setUnitKind(UnitKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.updateUnitKindCallable().futureCall(request);
+ * // Do something.
+ * UnitKind 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitKindName name = UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]");
+ * saasDeploymentsClient.deleteUnitKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnitKind(UnitKindName name) {
+ DeleteUnitKindRequest request =
+ DeleteUnitKindRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString();
+ * saasDeploymentsClient.deleteUnitKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnitKind(String name) {
+ DeleteUnitKindRequest request = DeleteUnitKindRequest.newBuilder().setName(name).build();
+ deleteUnitKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitKindRequest request =
+ * DeleteUnitKindRequest.newBuilder()
+ * .setName(UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteUnitKind(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 deleteUnitKind(DeleteUnitKindRequest request) {
+ deleteUnitKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit kind.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitKindRequest request =
+ * DeleteUnitKindRequest.newBuilder()
+ * .setName(UnitKindName.of("[PROJECT]", "[LOCATION]", "[UNITKIND]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.deleteUnitKindCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Unit element : saasDeploymentsClient.listUnits(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitsPagedResponse listUnits(LocationName parent) {
+ ListUnitsRequest request =
+ ListUnitsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listUnits(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of units.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Unit element : saasDeploymentsClient.listUnits(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitsPagedResponse listUnits(String parent) {
+ ListUnitsRequest request = ListUnitsRequest.newBuilder().setParent(parent).build();
+ return listUnits(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of units.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitsRequest request =
+ * ListUnitsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Unit element : saasDeploymentsClient.listUnits(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 ListUnitsPagedResponse listUnits(ListUnitsRequest request) {
+ return listUnitsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of units.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitsRequest request =
+ * ListUnitsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.listUnitsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Unit 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitsRequest request =
+ * ListUnitsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListUnitsResponse response = saasDeploymentsClient.listUnitsCallable().call(request);
+ * for (Unit element : response.getUnitsList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitName name = UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]");
+ * Unit response = saasDeploymentsClient.getUnit(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Unit getUnit(UnitName name) {
+ GetUnitRequest request =
+ GetUnitRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString();
+ * Unit response = saasDeploymentsClient.getUnit(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Unit getUnit(String name) {
+ GetUnitRequest request = GetUnitRequest.newBuilder().setName(name).build();
+ return getUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitRequest request =
+ * GetUnitRequest.newBuilder()
+ * .setName(UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString())
+ * .build();
+ * Unit response = saasDeploymentsClient.getUnit(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 Unit getUnit(GetUnitRequest request) {
+ return getUnitCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitRequest request =
+ * GetUnitRequest.newBuilder()
+ * .setName(UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.getUnitCallable().futureCall(request);
+ * // Do something.
+ * Unit 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Unit unit = Unit.newBuilder().build();
+ * String unitId = "unitId-840527425";
+ * Unit response = saasDeploymentsClient.createUnit(parent, unit, unitId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit.
+ * @param unit Required. The desired state for the unit.
+ * @param unitId Required. The ID value for the new unit.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Unit createUnit(LocationName parent, Unit unit, String unitId) {
+ CreateUnitRequest request =
+ CreateUnitRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUnit(unit)
+ .setUnitId(unitId)
+ .build();
+ return createUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Unit unit = Unit.newBuilder().build();
+ * String unitId = "unitId-840527425";
+ * Unit response = saasDeploymentsClient.createUnit(parent, unit, unitId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit.
+ * @param unit Required. The desired state for the unit.
+ * @param unitId Required. The ID value for the new unit.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Unit createUnit(String parent, Unit unit, String unitId) {
+ CreateUnitRequest request =
+ CreateUnitRequest.newBuilder().setParent(parent).setUnit(unit).setUnitId(unitId).build();
+ return createUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitRequest request =
+ * CreateUnitRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitId("unitId-840527425")
+ * .setUnit(Unit.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Unit response = saasDeploymentsClient.createUnit(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 Unit createUnit(CreateUnitRequest request) {
+ return createUnitCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitRequest request =
+ * CreateUnitRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitId("unitId-840527425")
+ * .setUnit(Unit.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.createUnitCallable().futureCall(request);
+ * // Do something.
+ * Unit 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * Unit unit = Unit.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Unit response = saasDeploymentsClient.updateUnit(unit, updateMask);
+ * }
+ * }
+ *
+ * @param unit Required. The desired state for the unit.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the Unit
+ * resource by the 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. + *
If the user does not provide a mask then all fields in the Unit will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Unit updateUnit(Unit unit, FieldMask updateMask) { + UpdateUnitRequest request = + UpdateUnitRequest.newBuilder().setUnit(unit).setUpdateMask(updateMask).build(); + return updateUnit(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single unit. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitRequest request =
+ * UpdateUnitRequest.newBuilder()
+ * .setUnit(Unit.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Unit response = saasDeploymentsClient.updateUnit(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 Unit updateUnit(UpdateUnitRequest request) {
+ return updateUnitCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitRequest request =
+ * UpdateUnitRequest.newBuilder()
+ * .setUnit(Unit.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.updateUnitCallable().futureCall(request);
+ * // Do something.
+ * Unit 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitName name = UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]");
+ * saasDeploymentsClient.deleteUnit(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnit(UnitName name) {
+ DeleteUnitRequest request =
+ DeleteUnitRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString();
+ * saasDeploymentsClient.deleteUnit(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnit(String name) {
+ DeleteUnitRequest request = DeleteUnitRequest.newBuilder().setName(name).build();
+ deleteUnit(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitRequest request =
+ * DeleteUnitRequest.newBuilder()
+ * .setName(UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteUnit(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 deleteUnit(DeleteUnitRequest request) {
+ deleteUnitCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitRequest request =
+ * DeleteUnitRequest.newBuilder()
+ * .setName(UnitName.of("[PROJECT]", "[LOCATION]", "[UNIT]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.deleteUnitCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (UnitOperation element : saasDeploymentsClient.listUnitOperations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit operation.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitOperationsPagedResponse listUnitOperations(LocationName parent) {
+ ListUnitOperationsRequest request =
+ ListUnitOperationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listUnitOperations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit operations.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (UnitOperation element : saasDeploymentsClient.listUnitOperations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit operation.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUnitOperationsPagedResponse listUnitOperations(String parent) {
+ ListUnitOperationsRequest request =
+ ListUnitOperationsRequest.newBuilder().setParent(parent).build();
+ return listUnitOperations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit operations.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitOperationsRequest request =
+ * ListUnitOperationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (UnitOperation element : saasDeploymentsClient.listUnitOperations(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 ListUnitOperationsPagedResponse listUnitOperations(
+ ListUnitOperationsRequest request) {
+ return listUnitOperationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of unit operations.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitOperationsRequest request =
+ * ListUnitOperationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.listUnitOperationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (UnitOperation 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListUnitOperationsRequest request =
+ * ListUnitOperationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListUnitOperationsResponse response =
+ * saasDeploymentsClient.listUnitOperationsCallable().call(request);
+ * for (UnitOperation element : response.getUnitOperationsList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitOperationName name = UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]");
+ * UnitOperation response = saasDeploymentsClient.getUnitOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitOperation getUnitOperation(UnitOperationName name) {
+ GetUnitOperationRequest request =
+ GetUnitOperationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString();
+ * UnitOperation response = saasDeploymentsClient.getUnitOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitOperation getUnitOperation(String name) {
+ GetUnitOperationRequest request = GetUnitOperationRequest.newBuilder().setName(name).build();
+ return getUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitOperationRequest request =
+ * GetUnitOperationRequest.newBuilder()
+ * .setName(
+ * UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString())
+ * .build();
+ * UnitOperation response = saasDeploymentsClient.getUnitOperation(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 UnitOperation getUnitOperation(GetUnitOperationRequest request) {
+ return getUnitOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetUnitOperationRequest request =
+ * GetUnitOperationRequest.newBuilder()
+ * .setName(
+ * UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString())
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.getUnitOperationCallable().futureCall(request);
+ * // Do something.
+ * UnitOperation 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * UnitOperation unitOperation = UnitOperation.newBuilder().build();
+ * String unitOperationId = "unitOperationId-638217026";
+ * UnitOperation response =
+ * saasDeploymentsClient.createUnitOperation(parent, unitOperation, unitOperationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit operation.
+ * @param unitOperation Required. The desired state for the unit operation.
+ * @param unitOperationId Required. The ID value for the new unit operation.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitOperation createUnitOperation(
+ LocationName parent, UnitOperation unitOperation, String unitOperationId) {
+ CreateUnitOperationRequest request =
+ CreateUnitOperationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUnitOperation(unitOperation)
+ .setUnitOperationId(unitOperationId)
+ .build();
+ return createUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * UnitOperation unitOperation = UnitOperation.newBuilder().build();
+ * String unitOperationId = "unitOperationId-638217026";
+ * UnitOperation response =
+ * saasDeploymentsClient.createUnitOperation(parent, unitOperation, unitOperationId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the unit operation.
+ * @param unitOperation Required. The desired state for the unit operation.
+ * @param unitOperationId Required. The ID value for the new unit operation.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UnitOperation createUnitOperation(
+ String parent, UnitOperation unitOperation, String unitOperationId) {
+ CreateUnitOperationRequest request =
+ CreateUnitOperationRequest.newBuilder()
+ .setParent(parent)
+ .setUnitOperation(unitOperation)
+ .setUnitOperationId(unitOperationId)
+ .build();
+ return createUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitOperationRequest request =
+ * CreateUnitOperationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitOperationId("unitOperationId-638217026")
+ * .setUnitOperation(UnitOperation.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * UnitOperation response = saasDeploymentsClient.createUnitOperation(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 UnitOperation createUnitOperation(CreateUnitOperationRequest request) {
+ return createUnitOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateUnitOperationRequest request =
+ * CreateUnitOperationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setUnitOperationId("unitOperationId-638217026")
+ * .setUnitOperation(UnitOperation.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.createUnitOperationCallable().futureCall(request);
+ * // Do something.
+ * UnitOperation 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitOperation unitOperation = UnitOperation.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * UnitOperation response = saasDeploymentsClient.updateUnitOperation(unitOperation, updateMask);
+ * }
+ * }
+ *
+ * @param unitOperation Required. The desired state for the unit operation.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the
+ * UnitOperation resource by the 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. + *
If the user does not provide a mask then all fields in the UnitOperation will be + * overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UnitOperation updateUnitOperation( + UnitOperation unitOperation, FieldMask updateMask) { + UpdateUnitOperationRequest request = + UpdateUnitOperationRequest.newBuilder() + .setUnitOperation(unitOperation) + .setUpdateMask(updateMask) + .build(); + return updateUnitOperation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single unit operation. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitOperationRequest request =
+ * UpdateUnitOperationRequest.newBuilder()
+ * .setUnitOperation(UnitOperation.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * UnitOperation response = saasDeploymentsClient.updateUnitOperation(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 UnitOperation updateUnitOperation(UpdateUnitOperationRequest request) {
+ return updateUnitOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateUnitOperationRequest request =
+ * UpdateUnitOperationRequest.newBuilder()
+ * .setUnitOperation(UnitOperation.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.updateUnitOperationCallable().futureCall(request);
+ * // Do something.
+ * UnitOperation 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UnitOperationName name = UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]");
+ * saasDeploymentsClient.deleteUnitOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnitOperation(UnitOperationName name) {
+ DeleteUnitOperationRequest request =
+ DeleteUnitOperationRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString();
+ * saasDeploymentsClient.deleteUnitOperation(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUnitOperation(String name) {
+ DeleteUnitOperationRequest request =
+ DeleteUnitOperationRequest.newBuilder().setName(name).build();
+ deleteUnitOperation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitOperationRequest request =
+ * DeleteUnitOperationRequest.newBuilder()
+ * .setName(
+ * UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteUnitOperation(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 deleteUnitOperation(DeleteUnitOperationRequest request) {
+ deleteUnitOperationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single unit operation.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteUnitOperationRequest request =
+ * DeleteUnitOperationRequest.newBuilder()
+ * .setName(
+ * UnitOperationName.of("[PROJECT]", "[LOCATION]", "[UNITOPERATION]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.deleteUnitOperationCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Release element : saasDeploymentsClient.listReleases(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the release.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReleasesPagedResponse listReleases(LocationName parent) {
+ ListReleasesRequest request =
+ ListReleasesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listReleases(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of releases.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Release element : saasDeploymentsClient.listReleases(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the release.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListReleasesPagedResponse listReleases(String parent) {
+ ListReleasesRequest request = ListReleasesRequest.newBuilder().setParent(parent).build();
+ return listReleases(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of releases.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListReleasesRequest request =
+ * ListReleasesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Release element : saasDeploymentsClient.listReleases(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 ListReleasesPagedResponse listReleases(ListReleasesRequest request) {
+ return listReleasesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of releases.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListReleasesRequest request =
+ * ListReleasesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.listReleasesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Release 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListReleasesRequest request =
+ * ListReleasesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListReleasesResponse response = saasDeploymentsClient.listReleasesCallable().call(request);
+ * for (Release element : response.getReleasesList()) {
+ * // 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ReleaseName name = ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]");
+ * Release response = saasDeploymentsClient.getRelease(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Release getRelease(ReleaseName name) {
+ GetReleaseRequest request =
+ GetReleaseRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString();
+ * Release response = saasDeploymentsClient.getRelease(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Release getRelease(String name) {
+ GetReleaseRequest request = GetReleaseRequest.newBuilder().setName(name).build();
+ return getRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetReleaseRequest request =
+ * GetReleaseRequest.newBuilder()
+ * .setName(ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString())
+ * .build();
+ * Release response = saasDeploymentsClient.getRelease(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 Release getRelease(GetReleaseRequest request) {
+ return getReleaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetReleaseRequest request =
+ * GetReleaseRequest.newBuilder()
+ * .setName(ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.getReleaseCallable().futureCall(request);
+ * // Do something.
+ * Release 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Release release = Release.newBuilder().build();
+ * String releaseId = "releaseId89607042";
+ * Release response = saasDeploymentsClient.createRelease(parent, release, releaseId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the release.
+ * @param release Required. The desired state for the release.
+ * @param releaseId Required. The ID value for the new release.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Release createRelease(LocationName parent, Release release, String releaseId) {
+ CreateReleaseRequest request =
+ CreateReleaseRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRelease(release)
+ .setReleaseId(releaseId)
+ .build();
+ return createRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Release release = Release.newBuilder().build();
+ * String releaseId = "releaseId89607042";
+ * Release response = saasDeploymentsClient.createRelease(parent, release, releaseId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the release.
+ * @param release Required. The desired state for the release.
+ * @param releaseId Required. The ID value for the new release.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Release createRelease(String parent, Release release, String releaseId) {
+ CreateReleaseRequest request =
+ CreateReleaseRequest.newBuilder()
+ .setParent(parent)
+ .setRelease(release)
+ .setReleaseId(releaseId)
+ .build();
+ return createRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateReleaseRequest request =
+ * CreateReleaseRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReleaseId("releaseId89607042")
+ * .setRelease(Release.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Release response = saasDeploymentsClient.createRelease(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 Release createRelease(CreateReleaseRequest request) {
+ return createReleaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * CreateReleaseRequest request =
+ * CreateReleaseRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setReleaseId("releaseId89607042")
+ * .setRelease(Release.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.createReleaseCallable().futureCall(request);
+ * // Do something.
+ * Release 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * Release release = Release.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Release response = saasDeploymentsClient.updateRelease(release, updateMask);
+ * }
+ * }
+ *
+ * @param release Required. The desired state for the release.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the Release
+ * resource by the 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. + *
If the user does not provide a mask then all fields in the Release will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Release updateRelease(Release release, FieldMask updateMask) { + UpdateReleaseRequest request = + UpdateReleaseRequest.newBuilder().setRelease(release).setUpdateMask(updateMask).build(); + return updateRelease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a single release. + * + *
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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateReleaseRequest request =
+ * UpdateReleaseRequest.newBuilder()
+ * .setRelease(Release.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Release response = saasDeploymentsClient.updateRelease(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 Release updateRelease(UpdateReleaseRequest request) {
+ return updateReleaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * UpdateReleaseRequest request =
+ * UpdateReleaseRequest.newBuilder()
+ * .setRelease(Release.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.updateReleaseCallable().futureCall(request);
+ * // Do something.
+ * Release 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ReleaseName name = ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]");
+ * saasDeploymentsClient.deleteRelease(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRelease(ReleaseName name) {
+ DeleteReleaseRequest request =
+ DeleteReleaseRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * String name = ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString();
+ * saasDeploymentsClient.deleteRelease(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRelease(String name) {
+ DeleteReleaseRequest request = DeleteReleaseRequest.newBuilder().setName(name).build();
+ deleteRelease(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteReleaseRequest request =
+ * DeleteReleaseRequest.newBuilder()
+ * .setName(ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasDeploymentsClient.deleteRelease(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 deleteRelease(DeleteReleaseRequest request) {
+ deleteReleaseCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single release.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * DeleteReleaseRequest request =
+ * DeleteReleaseRequest.newBuilder()
+ * .setName(ReleaseName.of("[PROJECT]", "[LOCATION]", "[RELEASE]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future = saasDeploymentsClient.deleteReleaseCallable().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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : saasDeploymentsClient.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.
+ *
+ * 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * saasDeploymentsClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location 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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * saasDeploymentsClient.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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = saasDeploymentsClient.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 (SaasDeploymentsClient saasDeploymentsClient = SaasDeploymentsClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = saasDeploymentsClient.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 getSaas: + * + *
{@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
+ * SaasDeploymentsSettings.Builder saasDeploymentsSettingsBuilder =
+ * SaasDeploymentsSettings.newBuilder();
+ * saasDeploymentsSettingsBuilder
+ * .getSaasSettings()
+ * .setRetrySettings(
+ * saasDeploymentsSettingsBuilder
+ * .getSaasSettings()
+ * .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());
+ * SaasDeploymentsSettings saasDeploymentsSettings = saasDeploymentsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SaasDeploymentsSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the SaasRolloutsClient object to clean up resources such
+ * as threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * ListRollouts Retrieve a collection of rollouts. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRollouts(ListRolloutsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRollouts(LocationName parent)
+ * listRollouts(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRolloutsPagedCallable()
+ * listRolloutsCallable()
+ * GetRollout Retrieve a single rollout. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRollout(GetRolloutRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRollout(RolloutName name)
+ * getRollout(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRolloutCallable()
+ * CreateRollout Create a new rollout. Request object method variants only take one parameter, a request object, which must be constructed before the call. createRollout(CreateRolloutRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createRollout(LocationName parent, Rollout rollout, String rolloutId)
+ * createRollout(String parent, Rollout rollout, String rolloutId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createRolloutCallable()
+ * UpdateRollout Update a single rollout. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateRollout(UpdateRolloutRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. updateRollout(Rollout rollout, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateRolloutCallable()
+ * DeleteRollout Delete a single rollout. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteRollout(DeleteRolloutRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteRollout(RolloutName name)
+ * deleteRollout(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteRolloutCallable()
+ * ListRolloutKinds Retrieve a collection of rollout kinds. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRolloutKinds(ListRolloutKindsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRolloutKinds(LocationName parent)
+ * listRolloutKinds(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRolloutKindsPagedCallable()
+ * listRolloutKindsCallable()
+ * GetRolloutKind Retrieve a single rollout kind. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRolloutKind(GetRolloutKindRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRolloutKind(RolloutKindName name)
+ * getRolloutKind(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRolloutKindCallable()
+ * CreateRolloutKind Create a new rollout kind. Request object method variants only take one parameter, a request object, which must be constructed before the call. createRolloutKind(CreateRolloutKindRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createRolloutKind(LocationName parent, RolloutKind rolloutKind, String rolloutKindId)
+ * createRolloutKind(String parent, RolloutKind rolloutKind, String rolloutKindId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createRolloutKindCallable()
+ * UpdateRolloutKind Update a single rollout kind. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateRolloutKind(UpdateRolloutKindRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. updateRolloutKind(RolloutKind rolloutKind, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateRolloutKindCallable()
+ * DeleteRolloutKind Delete a single rollout kind. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteRolloutKind(DeleteRolloutKindRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteRolloutKind(RolloutKindName name)
+ * deleteRolloutKind(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteRolloutKindCallable()
+ * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * 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 SaasRolloutsSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SaasRolloutsClient implements BackgroundResource {
+ private final SaasRolloutsSettings settings;
+ private final SaasRolloutsStub stub;
+
+ /** Constructs an instance of SaasRolloutsClient with default settings. */
+ public static final SaasRolloutsClient create() throws IOException {
+ return create(SaasRolloutsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of SaasRolloutsClient, 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 SaasRolloutsClient create(SaasRolloutsSettings settings) throws IOException {
+ return new SaasRolloutsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of SaasRolloutsClient, using the given stub for making calls. This is
+ * for advanced usage - prefer using create(SaasRolloutsSettings).
+ */
+ public static final SaasRolloutsClient create(SaasRolloutsStub stub) {
+ return new SaasRolloutsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of SaasRolloutsClient, 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 SaasRolloutsClient(SaasRolloutsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((SaasRolloutsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected SaasRolloutsClient(SaasRolloutsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final SaasRolloutsSettings getSettings() {
+ return settings;
+ }
+
+ public SaasRolloutsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollouts.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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.
+ * If the user does not provide a mask then all fields in the Rollout will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Rollout updateRollout(Rollout rollout, FieldMask updateMask) {
+ UpdateRolloutRequest request =
+ UpdateRolloutRequest.newBuilder().setRollout(rollout).setUpdateMask(updateMask).build();
+ return updateRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single rollout.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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.
+ * If the user does not provide a mask then all fields in the RolloutKind will be
+ * overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RolloutKind updateRolloutKind(RolloutKind rolloutKind, FieldMask updateMask) {
+ UpdateRolloutKindRequest request =
+ UpdateRolloutKindRequest.newBuilder()
+ .setRolloutKind(rolloutKind)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single rollout kind.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getRollout:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutName name = RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]");
+ * Rollout response = saasRolloutsClient.getRollout(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@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
+ * SaasRolloutsSettings saasRolloutsSettings =
+ * SaasRolloutsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create(saasRolloutsSettings);
+ * }
+ *
+ * {@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
+ * SaasRolloutsSettings saasRolloutsSettings =
+ * SaasRolloutsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create(saasRolloutsSettings);
+ * }
+ *
+ * {@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
+ * SaasRolloutsSettings saasRolloutsSettings = SaasRolloutsSettings.newHttpJsonBuilder().build();
+ * SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create(saasRolloutsSettings);
+ * }
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Rollout element : saasRolloutsClient.listRollouts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRolloutsPagedResponse listRollouts(LocationName parent) {
+ ListRolloutsRequest request =
+ ListRolloutsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listRollouts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollouts.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Rollout element : saasRolloutsClient.listRollouts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRolloutsPagedResponse listRollouts(String parent) {
+ ListRolloutsRequest request = ListRolloutsRequest.newBuilder().setParent(parent).build();
+ return listRollouts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollouts.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutsRequest request =
+ * ListRolloutsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Rollout element : saasRolloutsClient.listRollouts(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 ListRolloutsPagedResponse listRollouts(ListRolloutsRequest request) {
+ return listRolloutsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollouts.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutsRequest request =
+ * ListRolloutsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutsRequest request =
+ * ListRolloutsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListRolloutsResponse response = saasRolloutsClient.listRolloutsCallable().call(request);
+ * for (Rollout element : response.getRolloutsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutName name = RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]");
+ * Rollout response = saasRolloutsClient.getRollout(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Rollout getRollout(RolloutName name) {
+ GetRolloutRequest request =
+ GetRolloutRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String name = RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString();
+ * Rollout response = saasRolloutsClient.getRollout(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Rollout getRollout(String name) {
+ GetRolloutRequest request = GetRolloutRequest.newBuilder().setName(name).build();
+ return getRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetRolloutRequest request =
+ * GetRolloutRequest.newBuilder()
+ * .setName(RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString())
+ * .build();
+ * Rollout response = saasRolloutsClient.getRollout(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 Rollout getRollout(GetRolloutRequest request) {
+ return getRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetRolloutRequest request =
+ * GetRolloutRequest.newBuilder()
+ * .setName(RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Rollout rollout = Rollout.newBuilder().build();
+ * String rolloutId = "rolloutId551248556";
+ * Rollout response = saasRolloutsClient.createRollout(parent, rollout, rolloutId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout.
+ * @param rollout Required. The desired state for the rollout.
+ * @param rolloutId Required. The ID value for the new rollout.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Rollout createRollout(LocationName parent, Rollout rollout, String rolloutId) {
+ CreateRolloutRequest request =
+ CreateRolloutRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRollout(rollout)
+ .setRolloutId(rolloutId)
+ .build();
+ return createRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Rollout rollout = Rollout.newBuilder().build();
+ * String rolloutId = "rolloutId551248556";
+ * Rollout response = saasRolloutsClient.createRollout(parent, rollout, rolloutId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout.
+ * @param rollout Required. The desired state for the rollout.
+ * @param rolloutId Required. The ID value for the new rollout.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Rollout createRollout(String parent, Rollout rollout, String rolloutId) {
+ CreateRolloutRequest request =
+ CreateRolloutRequest.newBuilder()
+ .setParent(parent)
+ .setRollout(rollout)
+ .setRolloutId(rolloutId)
+ .build();
+ return createRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * CreateRolloutRequest request =
+ * CreateRolloutRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setRolloutId("rolloutId551248556")
+ * .setRollout(Rollout.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Rollout response = saasRolloutsClient.createRollout(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 Rollout createRollout(CreateRolloutRequest request) {
+ return createRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * CreateRolloutRequest request =
+ * CreateRolloutRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setRolloutId("rolloutId551248556")
+ * .setRollout(Rollout.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * Rollout rollout = Rollout.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Rollout response = saasRolloutsClient.updateRollout(rollout, updateMask);
+ * }
+ * }
+ *
+ * @param rollout Required. The desired state for the rollout.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the Rollout
+ * resource by the update.
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * UpdateRolloutRequest request =
+ * UpdateRolloutRequest.newBuilder()
+ * .setRollout(Rollout.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Rollout response = saasRolloutsClient.updateRollout(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 Rollout updateRollout(UpdateRolloutRequest request) {
+ return updateRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * UpdateRolloutRequest request =
+ * UpdateRolloutRequest.newBuilder()
+ * .setRollout(Rollout.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutName name = RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]");
+ * saasRolloutsClient.deleteRollout(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRollout(RolloutName name) {
+ DeleteRolloutRequest request =
+ DeleteRolloutRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String name = RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString();
+ * saasRolloutsClient.deleteRollout(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRollout(String name) {
+ DeleteRolloutRequest request = DeleteRolloutRequest.newBuilder().setName(name).build();
+ deleteRollout(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * DeleteRolloutRequest request =
+ * DeleteRolloutRequest.newBuilder()
+ * .setName(RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasRolloutsClient.deleteRollout(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 deleteRollout(DeleteRolloutRequest request) {
+ deleteRolloutCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * DeleteRolloutRequest request =
+ * DeleteRolloutRequest.newBuilder()
+ * .setName(RolloutName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_ID]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (RolloutKind element : saasRolloutsClient.listRolloutKinds(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRolloutKindsPagedResponse listRolloutKinds(LocationName parent) {
+ ListRolloutKindsRequest request =
+ ListRolloutKindsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listRolloutKinds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollout kinds.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (RolloutKind element : saasRolloutsClient.listRolloutKinds(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRolloutKindsPagedResponse listRolloutKinds(String parent) {
+ ListRolloutKindsRequest request =
+ ListRolloutKindsRequest.newBuilder().setParent(parent).build();
+ return listRolloutKinds(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollout kinds.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutKindsRequest request =
+ * ListRolloutKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (RolloutKind element : saasRolloutsClient.listRolloutKinds(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 ListRolloutKindsPagedResponse listRolloutKinds(ListRolloutKindsRequest request) {
+ return listRolloutKindsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a collection of rollout kinds.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutKindsRequest request =
+ * ListRolloutKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListRolloutKindsRequest request =
+ * ListRolloutKindsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListRolloutKindsResponse response =
+ * saasRolloutsClient.listRolloutKindsCallable().call(request);
+ * for (RolloutKind element : response.getRolloutKindsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutKindName name = RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]");
+ * RolloutKind response = saasRolloutsClient.getRolloutKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RolloutKind getRolloutKind(RolloutKindName name) {
+ GetRolloutKindRequest request =
+ GetRolloutKindRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String name = RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString();
+ * RolloutKind response = saasRolloutsClient.getRolloutKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RolloutKind getRolloutKind(String name) {
+ GetRolloutKindRequest request = GetRolloutKindRequest.newBuilder().setName(name).build();
+ return getRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetRolloutKindRequest request =
+ * GetRolloutKindRequest.newBuilder()
+ * .setName(
+ * RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString())
+ * .build();
+ * RolloutKind response = saasRolloutsClient.getRolloutKind(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 RolloutKind getRolloutKind(GetRolloutKindRequest request) {
+ return getRolloutKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieve a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetRolloutKindRequest request =
+ * GetRolloutKindRequest.newBuilder()
+ * .setName(
+ * RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * RolloutKind rolloutKind = RolloutKind.newBuilder().build();
+ * String rolloutKindId = "rolloutKindId-1380592416";
+ * RolloutKind response =
+ * saasRolloutsClient.createRolloutKind(parent, rolloutKind, rolloutKindId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout kind.
+ * @param rolloutKind Required. The desired state for the rollout kind.
+ * @param rolloutKindId Required. The ID value for the new rollout kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RolloutKind createRolloutKind(
+ LocationName parent, RolloutKind rolloutKind, String rolloutKindId) {
+ CreateRolloutKindRequest request =
+ CreateRolloutKindRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRolloutKind(rolloutKind)
+ .setRolloutKindId(rolloutKindId)
+ .build();
+ return createRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * RolloutKind rolloutKind = RolloutKind.newBuilder().build();
+ * String rolloutKindId = "rolloutKindId-1380592416";
+ * RolloutKind response =
+ * saasRolloutsClient.createRolloutKind(parent, rolloutKind, rolloutKindId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent of the rollout kind.
+ * @param rolloutKind Required. The desired state for the rollout kind.
+ * @param rolloutKindId Required. The ID value for the new rollout kind.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RolloutKind createRolloutKind(
+ String parent, RolloutKind rolloutKind, String rolloutKindId) {
+ CreateRolloutKindRequest request =
+ CreateRolloutKindRequest.newBuilder()
+ .setParent(parent)
+ .setRolloutKind(rolloutKind)
+ .setRolloutKindId(rolloutKindId)
+ .build();
+ return createRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * CreateRolloutKindRequest request =
+ * CreateRolloutKindRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setRolloutKindId("rolloutKindId-1380592416")
+ * .setRolloutKind(RolloutKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * RolloutKind response = saasRolloutsClient.createRolloutKind(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 RolloutKind createRolloutKind(CreateRolloutKindRequest request) {
+ return createRolloutKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a new rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * CreateRolloutKindRequest request =
+ * CreateRolloutKindRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setRolloutKindId("rolloutKindId-1380592416")
+ * .setRolloutKind(RolloutKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutKind rolloutKind = RolloutKind.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * RolloutKind response = saasRolloutsClient.updateRolloutKind(rolloutKind, updateMask);
+ * }
+ * }
+ *
+ * @param rolloutKind Required. The desired state for the rollout kind.
+ * @param updateMask Field mask is used to specify the fields to be overwritten in the RolloutKind
+ * resource by the update.
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * UpdateRolloutKindRequest request =
+ * UpdateRolloutKindRequest.newBuilder()
+ * .setRolloutKind(RolloutKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * RolloutKind response = saasRolloutsClient.updateRolloutKind(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 RolloutKind updateRolloutKind(UpdateRolloutKindRequest request) {
+ return updateRolloutKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * UpdateRolloutKindRequest request =
+ * UpdateRolloutKindRequest.newBuilder()
+ * .setRolloutKind(RolloutKind.newBuilder().build())
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * RolloutKindName name = RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]");
+ * saasRolloutsClient.deleteRolloutKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRolloutKind(RolloutKindName name) {
+ DeleteRolloutKindRequest request =
+ DeleteRolloutKindRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * String name = RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString();
+ * saasRolloutsClient.deleteRolloutKind(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the resource within a service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRolloutKind(String name) {
+ DeleteRolloutKindRequest request = DeleteRolloutKindRequest.newBuilder().setName(name).build();
+ deleteRolloutKind(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * DeleteRolloutKindRequest request =
+ * DeleteRolloutKindRequest.newBuilder()
+ * .setName(
+ * RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * saasRolloutsClient.deleteRolloutKind(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 deleteRolloutKind(DeleteRolloutKindRequest request) {
+ deleteRolloutKindCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a single rollout kind.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * DeleteRolloutKindRequest request =
+ * DeleteRolloutKindRequest.newBuilder()
+ * .setName(
+ * RolloutKindName.of("[PROJECT]", "[LOCATION]", "[ROLLOUT_KIND_ID]").toString())
+ * .setEtag("etag3123477")
+ * .setValidateOnly(true)
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : saasRolloutsClient.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.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = saasRolloutsClient.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 UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = saasRolloutsClient.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.
+ *
+ * {@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 (SaasRolloutsClient saasRolloutsClient = SaasRolloutsClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * SaasRolloutsSettings.Builder saasRolloutsSettingsBuilder = SaasRolloutsSettings.newBuilder();
+ * saasRolloutsSettingsBuilder
+ * .getRolloutSettings()
+ * .setRetrySettings(
+ * saasRolloutsSettingsBuilder
+ * .getRolloutSettings()
+ * .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());
+ * SaasRolloutsSettings saasRolloutsSettings = saasRolloutsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class SaasRolloutsSettings extends ClientSettings