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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Configuration response = licenseManagerClient.getConfiguration(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the LicenseManagerClient 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 | + *
|---|---|---|
ListConfigurations |
+ * Lists Configurations in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetConfiguration |
+ * Gets details of a single Configuration. |
+ *
+ * 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. + *
|
+ *
CreateConfiguration |
+ * Creates a new Configuration in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateConfiguration |
+ * Updates the parameters of a single Configuration. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteConfiguration |
+ * Deletes a single Configuration. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListInstances |
+ * Lists Instances in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetInstance |
+ * Gets details of a single Instance. |
+ *
+ * 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. + *
|
+ *
DeactivateConfiguration |
+ * Deactivates the given configuration. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ReactivateConfiguration |
+ * Reactivates the given configuration. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
QueryConfigurationLicenseUsage |
+ * License Usage information for a Configuration. |
+ *
+ * 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. + *
|
+ *
AggregateUsage |
+ * Aggregates Usage per Instance for a Configuration. |
+ *
+ * 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. + *
|
+ *
ListProducts |
+ * Lists Products in a given project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetProduct |
+ * Gets details of a single Product. |
+ *
+ * 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 LicenseManagerSettings 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
+ * LicenseManagerSettings licenseManagerSettings =
+ * LicenseManagerSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ *
+ * 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
+ * LicenseManagerSettings licenseManagerSettings =
+ * LicenseManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ *
+ * 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
+ * LicenseManagerSettings licenseManagerSettings =
+ * LicenseManagerSettings.newHttpJsonBuilder().build();
+ * LicenseManagerClient licenseManagerClient = LicenseManagerClient.create(licenseManagerSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class LicenseManagerClient implements BackgroundResource { + private final LicenseManagerSettings settings; + private final LicenseManagerStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of LicenseManagerClient with default settings. */ + public static final LicenseManagerClient create() throws IOException { + return create(LicenseManagerSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LicenseManagerClient, 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 LicenseManagerClient create(LicenseManagerSettings settings) + throws IOException { + return new LicenseManagerClient(settings); + } + + /** + * Constructs an instance of LicenseManagerClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(LicenseManagerSettings). + */ + public static final LicenseManagerClient create(LicenseManagerStub stub) { + return new LicenseManagerClient(stub); + } + + /** + * Constructs an instance of LicenseManagerClient, 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 LicenseManagerClient(LicenseManagerSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LicenseManagerStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected LicenseManagerClient(LicenseManagerStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final LicenseManagerSettings getSettings() { + return settings; + } + + public LicenseManagerStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Configurations in a given project and location. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListConfigurationsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConfigurationsPagedResponse listConfigurations(LocationName parent) {
+ ListConfigurationsRequest request =
+ ListConfigurationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listConfigurations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Configurations in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Configuration element : licenseManagerClient.listConfigurations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListConfigurationsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListConfigurationsPagedResponse listConfigurations(String parent) {
+ ListConfigurationsRequest request =
+ ListConfigurationsRequest.newBuilder().setParent(parent).build();
+ return listConfigurations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Configurations in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListConfigurationsRequest request =
+ * ListConfigurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Configuration element : licenseManagerClient.listConfigurations(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 ListConfigurationsPagedResponse listConfigurations(
+ ListConfigurationsRequest request) {
+ return listConfigurationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Configurations in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListConfigurationsRequest request =
+ * ListConfigurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.listConfigurationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Configuration 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListConfigurationsRequest request =
+ * ListConfigurationsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListConfigurationsResponse response =
+ * licenseManagerClient.listConfigurationsCallable().call(request);
+ * for (Configuration element : response.getConfigurationsList()) {
+ * // 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Configuration response = licenseManagerClient.getConfiguration(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Configuration getConfiguration(ConfigurationName name) {
+ GetConfigurationRequest request =
+ GetConfigurationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getConfiguration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * Configuration response = licenseManagerClient.getConfiguration(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Configuration getConfiguration(String name) {
+ GetConfigurationRequest request = GetConfigurationRequest.newBuilder().setName(name).build();
+ return getConfiguration(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetConfigurationRequest request =
+ * GetConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .build();
+ * Configuration response = licenseManagerClient.getConfiguration(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 Configuration getConfiguration(GetConfigurationRequest request) {
+ return getConfigurationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetConfigurationRequest request =
+ * GetConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.getConfigurationCallable().futureCall(request);
+ * // Do something.
+ * Configuration 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Configuration configuration = Configuration.newBuilder().build();
+ * String configurationId = "configurationId1948915889";
+ * Configuration response =
+ * licenseManagerClient
+ * .createConfigurationAsync(parent, configuration, configurationId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param configuration Required. The resource being created
+ * @param configurationId Required. Id of the requesting object
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Configuration configuration = Configuration.newBuilder().build();
+ * String configurationId = "configurationId1948915889";
+ * Configuration response =
+ * licenseManagerClient
+ * .createConfigurationAsync(parent, configuration, configurationId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. Value for parent.
+ * @param configuration Required. The resource being created
+ * @param configurationId Required. Id of the requesting object
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * CreateConfigurationRequest request =
+ * CreateConfigurationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setConfigurationId("configurationId1948915889")
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Configuration response = licenseManagerClient.createConfigurationAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * CreateConfigurationRequest request =
+ * CreateConfigurationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setConfigurationId("configurationId1948915889")
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * licenseManagerClient.createConfigurationOperationCallable().futureCall(request);
+ * // Do something.
+ * Configuration response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * CreateConfigurationRequest request =
+ * CreateConfigurationRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setConfigurationId("configurationId1948915889")
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.createConfigurationCallable().futureCall(request);
+ * // Do something.
+ * Operation 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * Configuration configuration = Configuration.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Configuration response =
+ * licenseManagerClient.updateConfigurationAsync(configuration, updateMask).get();
+ * }
+ * }
+ *
+ * @param configuration Required. The resource being updated
+ * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the
+ * Configuration 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 will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * UpdateConfigurationRequest request =
+ * UpdateConfigurationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Configuration response = licenseManagerClient.updateConfigurationAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * UpdateConfigurationRequest request =
+ * UpdateConfigurationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * licenseManagerClient.updateConfigurationOperationCallable().futureCall(request);
+ * // Do something.
+ * Configuration response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * UpdateConfigurationRequest request =
+ * UpdateConfigurationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setConfiguration(Configuration.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.updateConfigurationCallable().futureCall(request);
+ * // Do something.
+ * Operation 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * licenseManagerClient.deleteConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * licenseManagerClient.deleteConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeleteConfigurationRequest request =
+ * DeleteConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * licenseManagerClient.deleteConfigurationAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeleteConfigurationRequest request =
+ * DeleteConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * licenseManagerClient.deleteConfigurationOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeleteConfigurationRequest request =
+ * DeleteConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.deleteConfigurationCallable().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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListInstancesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInstancesPagedResponse listInstances(LocationName parent) {
+ ListInstancesRequest request =
+ ListInstancesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listInstances(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Instances in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Instance element : licenseManagerClient.listInstances(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListInstancesRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListInstancesPagedResponse listInstances(String parent) {
+ ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(parent).build();
+ return listInstances(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Instances in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Instance element : licenseManagerClient.listInstances(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 ListInstancesPagedResponse listInstances(ListInstancesRequest request) {
+ return listInstancesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Instances in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.listInstancesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Instance 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListInstancesRequest request =
+ * ListInstancesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListInstancesResponse response = licenseManagerClient.listInstancesCallable().call(request);
+ * for (Instance element : response.getInstancesList()) {
+ * // 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ * Instance response = licenseManagerClient.getInstance(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(InstanceName name) {
+ GetInstanceRequest request =
+ GetInstanceRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Instance.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+ * Instance response = licenseManagerClient.getInstance(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(String name) {
+ GetInstanceRequest request = GetInstanceRequest.newBuilder().setName(name).build();
+ return getInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Instance.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetInstanceRequest request =
+ * GetInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .build();
+ * Instance response = licenseManagerClient.getInstance(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 Instance getInstance(GetInstanceRequest request) {
+ return getInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Instance.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetInstanceRequest request =
+ * GetInstanceRequest.newBuilder()
+ * .setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+ * .build();
+ * ApiFuture future = licenseManagerClient.getInstanceCallable().futureCall(request);
+ * // Do something.
+ * Instance 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * Configuration response = licenseManagerClient.deactivateConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeactivateConfigurationRequest request =
+ * DeactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Configuration response = licenseManagerClient.deactivateConfigurationAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeactivateConfigurationRequest request =
+ * DeactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * licenseManagerClient.deactivateConfigurationOperationCallable().futureCall(request);
+ * // Do something.
+ * Configuration response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * DeactivateConfigurationRequest request =
+ * DeactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.deactivateConfigurationCallable().futureCall(request);
+ * // Do something.
+ * Operation 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * Configuration response = licenseManagerClient.reactivateConfigurationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ReactivateConfigurationRequest request =
+ * ReactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Configuration response = licenseManagerClient.reactivateConfigurationAsync(request).get();
+ * }
+ * }
+ *
+ * @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 OperationFutureSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ReactivateConfigurationRequest request =
+ * ReactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * licenseManagerClient.reactivateConfigurationOperationCallable().futureCall(request);
+ * // Do something.
+ * Configuration response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ReactivateConfigurationRequest request =
+ * ReactivateConfigurationRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.reactivateConfigurationCallable().futureCall(request);
+ * // Do something.
+ * Operation 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Timestamp startTime = Timestamp.newBuilder().build();
+ * Timestamp endTime = Timestamp.newBuilder().build();
+ * QueryConfigurationLicenseUsageResponse response =
+ * licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
+ * }
+ * }
+ *
+ * @param name Required. The resource path of the Configuration.
+ * @param startTime Required. The start time for retrieving the usage. If not specified, we will
+ * use the first day of the current billing period.
+ * @param endTime Required. The end time for retrieving the usage. If not specified, we will use
+ * the last day of the current billing period.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(
+ ConfigurationName name, Timestamp startTime, Timestamp endTime) {
+ QueryConfigurationLicenseUsageRequest request =
+ QueryConfigurationLicenseUsageRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setStartTime(startTime)
+ .setEndTime(endTime)
+ .build();
+ return queryConfigurationLicenseUsage(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * License Usage information for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * Timestamp startTime = Timestamp.newBuilder().build();
+ * Timestamp endTime = Timestamp.newBuilder().build();
+ * QueryConfigurationLicenseUsageResponse response =
+ * licenseManagerClient.queryConfigurationLicenseUsage(name, startTime, endTime);
+ * }
+ * }
+ *
+ * @param name Required. The resource path of the Configuration.
+ * @param startTime Required. The start time for retrieving the usage. If not specified, we will
+ * use the first day of the current billing period.
+ * @param endTime Required. The end time for retrieving the usage. If not specified, we will use
+ * the last day of the current billing period.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(
+ String name, Timestamp startTime, Timestamp endTime) {
+ QueryConfigurationLicenseUsageRequest request =
+ QueryConfigurationLicenseUsageRequest.newBuilder()
+ .setName(name)
+ .setStartTime(startTime)
+ .setEndTime(endTime)
+ .build();
+ return queryConfigurationLicenseUsage(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * License Usage information for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * QueryConfigurationLicenseUsageRequest request =
+ * QueryConfigurationLicenseUsageRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * QueryConfigurationLicenseUsageResponse response =
+ * licenseManagerClient.queryConfigurationLicenseUsage(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 QueryConfigurationLicenseUsageResponse queryConfigurationLicenseUsage(
+ QueryConfigurationLicenseUsageRequest request) {
+ return queryConfigurationLicenseUsageCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * License Usage information for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * QueryConfigurationLicenseUsageRequest request =
+ * QueryConfigurationLicenseUsageRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.queryConfigurationLicenseUsageCallable().futureCall(request);
+ * // Do something.
+ * QueryConfigurationLicenseUsageResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ QueryConfigurationLicenseUsageRequest, QueryConfigurationLicenseUsageResponse>
+ queryConfigurationLicenseUsageCallable() {
+ return stub.queryConfigurationLicenseUsageCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates Usage per Instance for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Timestamp startTime = Timestamp.newBuilder().build();
+ * Timestamp endTime = Timestamp.newBuilder().build();
+ * for (Usage element :
+ * licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. Parent value for AggregateUsageRequest
+ * @param startTime Required. Licenses are purchased per month - so usage track needs start time
+ * of a month.
+ * @param endTime Required. Usage track is always for a month. This parameter is for the end time
+ * of the month.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AggregateUsagePagedResponse aggregateUsage(
+ ConfigurationName name, Timestamp startTime, Timestamp endTime) {
+ AggregateUsageRequest request =
+ AggregateUsageRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .setStartTime(startTime)
+ .setEndTime(endTime)
+ .build();
+ return aggregateUsage(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates Usage per Instance for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString();
+ * Timestamp startTime = Timestamp.newBuilder().build();
+ * Timestamp endTime = Timestamp.newBuilder().build();
+ * for (Usage element :
+ * licenseManagerClient.aggregateUsage(name, startTime, endTime).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. Parent value for AggregateUsageRequest
+ * @param startTime Required. Licenses are purchased per month - so usage track needs start time
+ * of a month.
+ * @param endTime Required. Usage track is always for a month. This parameter is for the end time
+ * of the month.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AggregateUsagePagedResponse aggregateUsage(
+ String name, Timestamp startTime, Timestamp endTime) {
+ AggregateUsageRequest request =
+ AggregateUsageRequest.newBuilder()
+ .setName(name)
+ .setStartTime(startTime)
+ .setEndTime(endTime)
+ .build();
+ return aggregateUsage(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates Usage per Instance for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * AggregateUsageRequest request =
+ * AggregateUsageRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * for (Usage element : licenseManagerClient.aggregateUsage(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 AggregateUsagePagedResponse aggregateUsage(AggregateUsageRequest request) {
+ return aggregateUsagePagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Aggregates Usage per Instance for a Configuration.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * AggregateUsageRequest request =
+ * AggregateUsageRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.aggregateUsagePagedCallable().futureCall(request);
+ * // Do something.
+ * for (Usage 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * AggregateUsageRequest request =
+ * AggregateUsageRequest.newBuilder()
+ * .setName(
+ * ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setStartTime(Timestamp.newBuilder().build())
+ * .setEndTime(Timestamp.newBuilder().build())
+ * .build();
+ * while (true) {
+ * AggregateUsageResponse response =
+ * licenseManagerClient.aggregateUsageCallable().call(request);
+ * for (Usage element : response.getUsagesList()) {
+ * // 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListProductsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProductsPagedResponse listProducts(LocationName parent) {
+ ListProductsRequest request =
+ ListProductsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProducts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Products in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Product element : licenseManagerClient.listProducts(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Parent value for ListProductsRequest
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProductsPagedResponse listProducts(String parent) {
+ ListProductsRequest request = ListProductsRequest.newBuilder().setParent(parent).build();
+ return listProducts(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Products in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListProductsRequest request =
+ * ListProductsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Product element : licenseManagerClient.listProducts(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 ListProductsPagedResponse listProducts(ListProductsRequest request) {
+ return listProductsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Products in a given project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListProductsRequest request =
+ * ListProductsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.listProductsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Product 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListProductsRequest request =
+ * ListProductsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListProductsResponse response = licenseManagerClient.listProductsCallable().call(request);
+ * for (Product element : response.getProductsList()) {
+ * // 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ProductName name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]");
+ * Product response = licenseManagerClient.getProduct(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Product getProduct(ProductName name) {
+ GetProductRequest request =
+ GetProductRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getProduct(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Product.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * String name = ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString();
+ * Product response = licenseManagerClient.getProduct(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the resource
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Product getProduct(String name) {
+ GetProductRequest request = GetProductRequest.newBuilder().setName(name).build();
+ return getProduct(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Product.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetProductRequest request =
+ * GetProductRequest.newBuilder()
+ * .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+ * .build();
+ * Product response = licenseManagerClient.getProduct(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 Product getProduct(GetProductRequest request) {
+ return getProductCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Product.
+ *
+ * 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetProductRequest request =
+ * GetProductRequest.newBuilder()
+ * .setName(ProductName.of("[PROJECT]", "[LOCATION]", "[PRODUCT]").toString())
+ * .build();
+ * ApiFuture future = licenseManagerClient.getProductCallable().futureCall(request);
+ * // Do something.
+ * Product 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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : licenseManagerClient.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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * licenseManagerClient.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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = licenseManagerClient.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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = licenseManagerClient.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 (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = licenseManagerClient.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 getConfiguration: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerSettings.Builder licenseManagerSettingsBuilder =
+ * LicenseManagerSettings.newBuilder();
+ * licenseManagerSettingsBuilder
+ * .getConfigurationSettings()
+ * .setRetrySettings(
+ * licenseManagerSettingsBuilder
+ * .getConfigurationSettings()
+ * .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());
+ * LicenseManagerSettings licenseManagerSettings = licenseManagerSettingsBuilder.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.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createConfiguration: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * LicenseManagerSettings.Builder licenseManagerSettingsBuilder =
+ * LicenseManagerSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * licenseManagerSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class LicenseManagerSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= LicenseManagerClient =======================
+ *
+ * Service Description: Service describing handlers for resources
+ *
+ * Sample for LicenseManagerClient:
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcLicenseManagerCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcLicenseManagerStub extends LicenseManagerStub {
+ private static final MethodDescriptor{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (LicenseManagerClient licenseManagerClient = LicenseManagerClient.create()) {
+ * ConfigurationName name = ConfigurationName.of("[PROJECT]", "[LOCATION]", "[CONFIGURATION]");
+ * Configuration response = licenseManagerClient.getConfiguration(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.licensemanager.v1;
+
+import javax.annotation.Generated;
diff --git a/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java
new file mode 100644
index 000000000000..282a9dcbb83f
--- /dev/null
+++ b/java-licensemanager/google-cloud-licensemanager/src/main/java/com/google/cloud/licensemanager/v1/stub/GrpcLicenseManagerCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.licensemanager.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the LicenseManager service API.
+ *
+ *