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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + * Order response = gDCHardwareManagementClient.getOrder(name); + * } + * }+ * + *
Note: close() needs to be called on the GDCHardwareManagementClient 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 | + *
---|---|---|
ListOrders |
+ * Lists orders 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. + *
|
+ *
GetOrder |
+ * Gets details of an order. |
+ *
+ * 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. + *
|
+ *
CreateOrder |
+ * Creates a new order 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. + *
|
+ *
UpdateOrder |
+ * Updates the parameters of an order. |
+ *
+ * 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. + *
|
+ *
DeleteOrder |
+ * Deletes an order. |
+ *
+ * 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. + *
|
+ *
SubmitOrder |
+ * Submits an order. |
+ *
+ * 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. + *
|
+ *
ListSites |
+ * Lists sites 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. + *
|
+ *
GetSite |
+ * Gets details of a site. |
+ *
+ * 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. + *
|
+ *
CreateSite |
+ * Creates a new site 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. + *
|
+ *
UpdateSite |
+ * Updates the parameters of a site. |
+ *
+ * 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. + *
|
+ *
ListHardwareGroups |
+ * Lists hardware groups in a given order. |
+ *
+ * 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. + *
|
+ *
GetHardwareGroup |
+ * Gets details of a hardware group. |
+ *
+ * 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. + *
|
+ *
CreateHardwareGroup |
+ * Creates a new hardware group in a given order. |
+ *
+ * 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. + *
|
+ *
UpdateHardwareGroup |
+ * Updates the parameters of a hardware group. |
+ *
+ * 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. + *
|
+ *
DeleteHardwareGroup |
+ * Deletes a hardware group. |
+ *
+ * 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. + *
|
+ *
ListHardware |
+ * Lists hardware 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. + *
|
+ *
GetHardware |
+ * Gets hardware details. |
+ *
+ * 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. + *
|
+ *
CreateHardware |
+ * Creates new hardware 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. + *
|
+ *
UpdateHardware |
+ * Updates hardware parameters. |
+ *
+ * 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. + *
|
+ *
DeleteHardware |
+ * Deletes hardware. |
+ *
+ * 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. + *
|
+ *
ListComments |
+ * Lists the comments on an order. |
+ *
+ * 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. + *
|
+ *
GetComment |
+ * Gets the content of a comment. |
+ *
+ * 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. + *
|
+ *
CreateComment |
+ * Creates a new comment on an order. |
+ *
+ * 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. + *
|
+ *
ListChangeLogEntries |
+ * Lists the changes made to an order. |
+ *
+ * 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. + *
|
+ *
GetChangeLogEntry |
+ * Gets details of a change to an order. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListSkus |
+ * Lists SKUs for 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. + *
|
+ *
GetSku |
+ * Gets details of an SKU. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListZones |
+ * Lists zones 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. + *
|
+ *
GetZone |
+ * Gets details of a zone. |
+ *
+ * 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. + *
|
+ *
CreateZone |
+ * Creates a new zone 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. + *
|
+ *
UpdateZone |
+ * Updates the parameters of a zone. |
+ *
+ * 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. + *
|
+ *
DeleteZone |
+ * Deletes a zone. |
+ *
+ * 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. + *
|
+ *
SignalZoneState |
+ * Signals the state of a zone. |
+ *
+ * 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. + *
|
+ *
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 GDCHardwareManagementSettings + * 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 + * GDCHardwareManagementSettings gDCHardwareManagementSettings = + * GDCHardwareManagementSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + * }+ * + *
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 + * GDCHardwareManagementSettings gDCHardwareManagementSettings = + * GDCHardwareManagementSettings.newBuilder().setEndpoint(myEndpoint).build(); + * GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + * }+ * + *
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 + * GDCHardwareManagementSettings gDCHardwareManagementSettings = + * GDCHardwareManagementSettings.newHttpJsonBuilder().build(); + * GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create(gDCHardwareManagementSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GDCHardwareManagementClient implements BackgroundResource { + private final GDCHardwareManagementSettings settings; + private final GDCHardwareManagementStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of GDCHardwareManagementClient with default settings. */ + public static final GDCHardwareManagementClient create() throws IOException { + return create(GDCHardwareManagementSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, 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 GDCHardwareManagementClient create(GDCHardwareManagementSettings settings) + throws IOException { + return new GDCHardwareManagementClient(settings); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(GDCHardwareManagementSettings). + */ + public static final GDCHardwareManagementClient create(GDCHardwareManagementStub stub) { + return new GDCHardwareManagementClient(stub); + } + + /** + * Constructs an instance of GDCHardwareManagementClient, 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 GDCHardwareManagementClient(GDCHardwareManagementSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GDCHardwareManagementStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected GDCHardwareManagementClient(GDCHardwareManagementStub 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 GDCHardwareManagementSettings getSettings() { + return settings; + } + + public GDCHardwareManagementStub 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 orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The project and location to list orders in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(LocationName parent) { + ListOrdersRequest request = + ListOrdersRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listOrders(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (Order element : gDCHardwareManagementClient.listOrders(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The project and location to list orders in. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(String parent) { + ListOrdersRequest request = ListOrdersRequest.newBuilder().setParent(parent).build(); + return listOrders(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Order element : gDCHardwareManagementClient.listOrders(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 ListOrdersPagedResponse listOrders(ListOrdersRequest request) { + return listOrdersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists orders 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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * gDCHardwareManagementClient.listOrdersPagedCallable().futureCall(request); + * // Do something. + * for (Order element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListOrdersResponse response = + * gDCHardwareManagementClient.listOrdersCallable().call(request); + * for (Order element : response.getOrdersList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]"); + * Order response = gDCHardwareManagementClient.getOrder(name); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Order getOrder(OrderName name) { + GetOrderRequest request = + GetOrderRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getOrder(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an order. + * + *
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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString(); + * Order response = gDCHardwareManagementClient.getOrder(name); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Order getOrder(String name) { + GetOrderRequest request = GetOrderRequest.newBuilder().setName(name).build(); + return getOrder(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an order. + * + *
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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * GetOrderRequest request = + * GetOrderRequest.newBuilder() + * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + * .build(); + * Order response = gDCHardwareManagementClient.getOrder(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 Order getOrder(GetOrderRequest request) { + return getOrderCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of an order. + * + *
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 (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * GetOrderRequest request = + * GetOrderRequest.newBuilder() + * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = gDCHardwareManagementClient.getOrderCallable().futureCall(request); + * // Do something. + * Order response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (GDCHardwareManagementClient gDCHardwareManagementClient = + * GDCHardwareManagementClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * Order order = Order.newBuilder().build(); + * String orderId = "orderId-1207110391"; + * Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get(); + * } + * }+ * + * @param parent Required. The project and location to create the order in. Format: + * `projects/{project}/locations/{location}` + * @param order Required. The order to create. + * @param orderId Optional. ID used to uniquely identify the Order within its parent scope. This + * field should contain at most 63 characters and must start with lowercase characters. Only + * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first + * or the last one. A system generated ID will be used if the field is not set. + *
The order.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The order.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The site.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The site.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The hardware_group.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The hardware_group.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The hardware.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The hardware.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The comment.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The comment.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The zone.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * The zone.name field in the request will be ignored.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getOrder to 30 seconds:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Order order = Order.newBuilder().build();
+ * String orderId = "orderId-1207110391";
+ * Order response = gDCHardwareManagementClient.createOrderAsync(parent, order, orderId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the order in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param order Required. The order to create.
+ * @param orderId Optional. ID used to uniquely identify the Order within its parent scope. This
+ * field should contain at most 63 characters and must start with lowercase characters. Only
+ * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first
+ * or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateOrderRequest request =
+ * CreateOrderRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOrderId("orderId-1207110391")
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Order response = gDCHardwareManagementClient.createOrderAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateOrderRequest request =
+ * CreateOrderRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOrderId("orderId-1207110391")
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateOrderRequest request =
+ * CreateOrderRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setOrderId("orderId-1207110391")
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * Order order = Order.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Order response = gDCHardwareManagementClient.updateOrderAsync(order, updateMask).get();
+ * }
+ * }
+ *
+ * @param order Required. The order to update.
+ * @param updateMask Required. A mask to specify the fields in the Order to overwrite with this
+ * update. The fields specified in the update_mask are relative to the order, not the full
+ * request. A field will be overwritten if it is in the mask. If you don't provide a mask then
+ * all fields will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateOrderRequest request =
+ * UpdateOrderRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Order response = gDCHardwareManagementClient.updateOrderAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateOrderRequest request =
+ * UpdateOrderRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateOrderRequest request =
+ * UpdateOrderRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setOrder(Order.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * gDCHardwareManagementClient.deleteOrderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the order. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * gDCHardwareManagementClient.deleteOrderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the order. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteOrderRequest request =
+ * DeleteOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * gDCHardwareManagementClient.deleteOrderAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteOrderRequest request =
+ * DeleteOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteOrderRequest request =
+ * DeleteOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .setForce(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * Order response = gDCHardwareManagementClient.submitOrderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the order. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * Order response = gDCHardwareManagementClient.submitOrderAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the order. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SubmitOrderRequest request =
+ * SubmitOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Order response = gDCHardwareManagementClient.submitOrderAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SubmitOrderRequest request =
+ * SubmitOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SubmitOrderRequest request =
+ * SubmitOrderRequest.newBuilder()
+ * .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list sites in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSitesPagedResponse listSites(LocationName parent) {
+ ListSitesRequest request =
+ ListSitesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSites(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists sites in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Site element : gDCHardwareManagementClient.listSites(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list sites in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSitesPagedResponse listSites(String parent) {
+ ListSitesRequest request = ListSitesRequest.newBuilder().setParent(parent).build();
+ return listSites(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists sites in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSitesRequest request =
+ * ListSitesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Site element : gDCHardwareManagementClient.listSites(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 ListSitesPagedResponse listSites(ListSitesRequest request) {
+ return listSitesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists sites in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSitesRequest request =
+ * ListSitesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSitesRequest request =
+ * ListSitesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSitesResponse response = gDCHardwareManagementClient.listSitesCallable().call(request);
+ * for (Site element : response.getSitesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SiteName name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]");
+ * Site response = gDCHardwareManagementClient.getSite(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the site. Format:
+ * `projects/{project}/locations/{location}/sites/{site}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Site getSite(SiteName name) {
+ GetSiteRequest request =
+ GetSiteRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSite(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a site.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString();
+ * Site response = gDCHardwareManagementClient.getSite(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the site. Format:
+ * `projects/{project}/locations/{location}/sites/{site}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Site getSite(String name) {
+ GetSiteRequest request = GetSiteRequest.newBuilder().setName(name).build();
+ return getSite(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a site.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetSiteRequest request =
+ * GetSiteRequest.newBuilder()
+ * .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
+ * .build();
+ * Site response = gDCHardwareManagementClient.getSite(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 Site getSite(GetSiteRequest request) {
+ return getSiteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a site.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetSiteRequest request =
+ * GetSiteRequest.newBuilder()
+ * .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Site site = Site.newBuilder().build();
+ * String siteId = "siteId-902090046";
+ * Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the site in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param site Required. The site to create.
+ * @param siteId Optional. ID used to uniquely identify the Site within its parent scope. This
+ * field should contain at most 63 characters and must start with lowercase characters. Only
+ * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first
+ * or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Site site = Site.newBuilder().build();
+ * String siteId = "siteId-902090046";
+ * Site response = gDCHardwareManagementClient.createSiteAsync(parent, site, siteId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the site in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param site Required. The site to create.
+ * @param siteId Optional. ID used to uniquely identify the Site within its parent scope. This
+ * field should contain at most 63 characters and must start with lowercase characters. Only
+ * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first
+ * or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateSiteRequest request =
+ * CreateSiteRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSiteId("siteId-902090046")
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Site response = gDCHardwareManagementClient.createSiteAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateSiteRequest request =
+ * CreateSiteRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSiteId("siteId-902090046")
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateSiteRequest request =
+ * CreateSiteRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSiteId("siteId-902090046")
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * Site site = Site.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Site response = gDCHardwareManagementClient.updateSiteAsync(site, updateMask).get();
+ * }
+ * }
+ *
+ * @param site Required. The site to update.
+ * @param updateMask Required. A mask to specify the fields in the Site to overwrite with this
+ * update. The fields specified in the update_mask are relative to the site, not the full
+ * request. A field will be overwritten if it is in the mask. If you don't provide a mask then
+ * all fields will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateSiteRequest request =
+ * UpdateSiteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Site response = gDCHardwareManagementClient.updateSiteAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateSiteRequest request =
+ * UpdateSiteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateSiteRequest request =
+ * UpdateSiteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSite(Site.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * for (HardwareGroup element :
+ * gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list hardware groups in. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListHardwareGroupsPagedResponse listHardwareGroups(OrderName parent) {
+ ListHardwareGroupsRequest request =
+ ListHardwareGroupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listHardwareGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware groups in a given order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * for (HardwareGroup element :
+ * gDCHardwareManagementClient.listHardwareGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list hardware groups in. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListHardwareGroupsPagedResponse listHardwareGroups(String parent) {
+ ListHardwareGroupsRequest request =
+ ListHardwareGroupsRequest.newBuilder().setParent(parent).build();
+ return listHardwareGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware groups in a given order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareGroupsRequest request =
+ * ListHardwareGroupsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (HardwareGroup element :
+ * gDCHardwareManagementClient.listHardwareGroups(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 ListHardwareGroupsPagedResponse listHardwareGroups(
+ ListHardwareGroupsRequest request) {
+ return listHardwareGroupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware groups in a given order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareGroupsRequest request =
+ * ListHardwareGroupsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareGroupsRequest request =
+ * ListHardwareGroupsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListHardwareGroupsResponse response =
+ * gDCHardwareManagementClient.listHardwareGroupsCallable().call(request);
+ * for (HardwareGroup element : response.getHardwareGroupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * HardwareGroupName name =
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]");
+ * HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware group. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HardwareGroup getHardwareGroup(HardwareGroupName name) {
+ GetHardwareGroupRequest request =
+ GetHardwareGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getHardwareGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a hardware group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name =
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString();
+ * HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware group. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final HardwareGroup getHardwareGroup(String name) {
+ GetHardwareGroupRequest request = GetHardwareGroupRequest.newBuilder().setName(name).build();
+ return getHardwareGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a hardware group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetHardwareGroupRequest request =
+ * GetHardwareGroupRequest.newBuilder()
+ * .setName(
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+ * .toString())
+ * .build();
+ * HardwareGroup response = gDCHardwareManagementClient.getHardwareGroup(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 HardwareGroup getHardwareGroup(GetHardwareGroupRequest request) {
+ return getHardwareGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a hardware group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetHardwareGroupRequest request =
+ * GetHardwareGroupRequest.newBuilder()
+ * .setName(
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+ * String hardwareGroupId = "hardwareGroupId-1961682702";
+ * HardwareGroup response =
+ * gDCHardwareManagementClient
+ * .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The order to create the hardware group in. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @param hardwareGroup Required. The hardware group to create.
+ * @param hardwareGroupId Optional. ID used to uniquely identify the HardwareGroup within its
+ * parent scope. This field should contain at most 63 characters and must start with lowercase
+ * characters. Only lowercase characters, numbers and `-` are accepted. The `-` character
+ * cannot be the first or the last one. A system generated ID will be used if the field is not
+ * set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+ * String hardwareGroupId = "hardwareGroupId-1961682702";
+ * HardwareGroup response =
+ * gDCHardwareManagementClient
+ * .createHardwareGroupAsync(parent, hardwareGroup, hardwareGroupId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The order to create the hardware group in. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @param hardwareGroup Required. The hardware group to create.
+ * @param hardwareGroupId Optional. ID used to uniquely identify the HardwareGroup within its
+ * parent scope. This field should contain at most 63 characters and must start with lowercase
+ * characters. Only lowercase characters, numbers and `-` are accepted. The `-` character
+ * cannot be the first or the last one. A system generated ID will be used if the field is not
+ * set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareGroupRequest request =
+ * CreateHardwareGroupRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setHardwareGroupId("hardwareGroupId-1961682702")
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * HardwareGroup response = gDCHardwareManagementClient.createHardwareGroupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareGroupRequest request =
+ * CreateHardwareGroupRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setHardwareGroupId("hardwareGroupId-1961682702")
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareGroupRequest request =
+ * CreateHardwareGroupRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setHardwareGroupId("hardwareGroupId-1961682702")
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * HardwareGroup hardwareGroup = HardwareGroup.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * HardwareGroup response =
+ * gDCHardwareManagementClient.updateHardwareGroupAsync(hardwareGroup, updateMask).get();
+ * }
+ * }
+ *
+ * @param hardwareGroup Required. The hardware group to update.
+ * @param updateMask Required. A mask to specify the fields in the HardwareGroup to overwrite with
+ * this update. The fields specified in the update_mask are relative to the hardware group,
+ * not the full request. A field will be overwritten if it is in the mask. If you don't
+ * provide a mask then all fields will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareGroupRequest request =
+ * UpdateHardwareGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * HardwareGroup response = gDCHardwareManagementClient.updateHardwareGroupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareGroupRequest request =
+ * UpdateHardwareGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareGroupRequest request =
+ * UpdateHardwareGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardwareGroup(HardwareGroup.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * HardwareGroupName name =
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]");
+ * gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware group. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name =
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]").toString();
+ * gDCHardwareManagementClient.deleteHardwareGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware group. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareGroupRequest request =
+ * DeleteHardwareGroupRequest.newBuilder()
+ * .setName(
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * gDCHardwareManagementClient.deleteHardwareGroupAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareGroupRequest request =
+ * DeleteHardwareGroupRequest.newBuilder()
+ * .setName(
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareGroupRequest request =
+ * DeleteHardwareGroupRequest.newBuilder()
+ * .setName(
+ * HardwareGroupName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[HARDWARE_GROUP]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list hardware in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListHardwarePagedResponse listHardware(LocationName parent) {
+ ListHardwareRequest request =
+ ListHardwareRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listHardware(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Hardware element : gDCHardwareManagementClient.listHardware(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list hardware in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListHardwarePagedResponse listHardware(String parent) {
+ ListHardwareRequest request = ListHardwareRequest.newBuilder().setParent(parent).build();
+ return listHardware(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareRequest request =
+ * ListHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Hardware element : gDCHardwareManagementClient.listHardware(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 ListHardwarePagedResponse listHardware(ListHardwareRequest request) {
+ return listHardwarePagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists hardware in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareRequest request =
+ * ListHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListHardwareRequest request =
+ * ListHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListHardwareResponse response =
+ * gDCHardwareManagementClient.listHardwareCallable().call(request);
+ * for (Hardware element : response.getHardwareList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]");
+ * Hardware response = gDCHardwareManagementClient.getHardware(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware. Format:
+ * `projects/{project}/locations/{location}/hardware/{hardware}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Hardware getHardware(HardwareName name) {
+ GetHardwareRequest request =
+ GetHardwareRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getHardware(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets hardware details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString();
+ * Hardware response = gDCHardwareManagementClient.getHardware(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware. Format:
+ * `projects/{project}/locations/{location}/hardware/{hardware}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Hardware getHardware(String name) {
+ GetHardwareRequest request = GetHardwareRequest.newBuilder().setName(name).build();
+ return getHardware(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets hardware details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetHardwareRequest request =
+ * GetHardwareRequest.newBuilder()
+ * .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+ * .build();
+ * Hardware response = gDCHardwareManagementClient.getHardware(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 Hardware getHardware(GetHardwareRequest request) {
+ return getHardwareCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets hardware details.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetHardwareRequest request =
+ * GetHardwareRequest.newBuilder()
+ * .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Hardware hardware = Hardware.newBuilder().build();
+ * String hardwareId = "hardwareId680924451";
+ * Hardware response =
+ * gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create hardware in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param hardware Required. The resource to create.
+ * @param hardwareId Optional. ID used to uniquely identify the Hardware within its parent scope.
+ * This field should contain at most 63 characters and must start with lowercase characters.
+ * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the
+ * first or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Hardware hardware = Hardware.newBuilder().build();
+ * String hardwareId = "hardwareId680924451";
+ * Hardware response =
+ * gDCHardwareManagementClient.createHardwareAsync(parent, hardware, hardwareId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create hardware in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param hardware Required. The resource to create.
+ * @param hardwareId Optional. ID used to uniquely identify the Hardware within its parent scope.
+ * This field should contain at most 63 characters and must start with lowercase characters.
+ * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the
+ * first or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareRequest request =
+ * CreateHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHardwareId("hardwareId680924451")
+ * .setHardware(Hardware.newBuilder().build())
+ * .build();
+ * Hardware response = gDCHardwareManagementClient.createHardwareAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareRequest request =
+ * CreateHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHardwareId("hardwareId680924451")
+ * .setHardware(Hardware.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateHardwareRequest request =
+ * CreateHardwareRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHardwareId("hardwareId680924451")
+ * .setHardware(Hardware.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * Hardware hardware = Hardware.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Hardware response =
+ * gDCHardwareManagementClient.updateHardwareAsync(hardware, updateMask).get();
+ * }
+ * }
+ *
+ * @param hardware Required. The hardware to update.
+ * @param updateMask Required. A mask to specify the fields in the Hardware to overwrite with this
+ * update. The fields specified in the update_mask are relative to the hardware, not the full
+ * request. A field will be overwritten if it is in the mask. If you don't provide a mask then
+ * all fields will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareRequest request =
+ * UpdateHardwareRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardware(Hardware.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Hardware response = gDCHardwareManagementClient.updateHardwareAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareRequest request =
+ * UpdateHardwareRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardware(Hardware.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateHardwareRequest request =
+ * UpdateHardwareRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHardware(Hardware.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * HardwareName name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]");
+ * gDCHardwareManagementClient.deleteHardwareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware. Format:
+ * `projects/{project}/locations/{location}/hardware/{hardware}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString();
+ * gDCHardwareManagementClient.deleteHardwareAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hardware. Format:
+ * `projects/{project}/locations/{location}/hardware/{hardware}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareRequest request =
+ * DeleteHardwareRequest.newBuilder()
+ * .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * gDCHardwareManagementClient.deleteHardwareAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareRequest request =
+ * DeleteHardwareRequest.newBuilder()
+ * .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteHardwareRequest request =
+ * DeleteHardwareRequest.newBuilder()
+ * .setName(HardwareName.of("[PROJECT]", "[LOCATION]", "[HARDWARE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list comments on. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCommentsPagedResponse listComments(OrderName parent) {
+ ListCommentsRequest request =
+ ListCommentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listComments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the comments on an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * for (Comment element : gDCHardwareManagementClient.listComments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list comments on. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListCommentsPagedResponse listComments(String parent) {
+ ListCommentsRequest request = ListCommentsRequest.newBuilder().setParent(parent).build();
+ return listComments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the comments on an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListCommentsRequest request =
+ * ListCommentsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Comment element : gDCHardwareManagementClient.listComments(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 ListCommentsPagedResponse listComments(ListCommentsRequest request) {
+ return listCommentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the comments on an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListCommentsRequest request =
+ * ListCommentsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListCommentsRequest request =
+ * ListCommentsRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListCommentsResponse response =
+ * gDCHardwareManagementClient.listCommentsCallable().call(request);
+ * for (Comment element : response.getCommentsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CommentName name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]");
+ * Comment response = gDCHardwareManagementClient.getComment(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the comment. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Comment getComment(CommentName name) {
+ GetCommentRequest request =
+ GetCommentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getComment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the content of a comment.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString();
+ * Comment response = gDCHardwareManagementClient.getComment(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the comment. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Comment getComment(String name) {
+ GetCommentRequest request = GetCommentRequest.newBuilder().setName(name).build();
+ return getComment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the content of a comment.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetCommentRequest request =
+ * GetCommentRequest.newBuilder()
+ * .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString())
+ * .build();
+ * Comment response = gDCHardwareManagementClient.getComment(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 Comment getComment(GetCommentRequest request) {
+ return getCommentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the content of a comment.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetCommentRequest request =
+ * GetCommentRequest.newBuilder()
+ * .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * Comment comment = Comment.newBuilder().build();
+ * String commentId = "commentId-1495016486";
+ * Comment response =
+ * gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The order to create the comment on. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @param comment Required. The comment to create.
+ * @param commentId Optional. ID used to uniquely identify the Comment within its parent scope.
+ * This field should contain at most 63 characters and must start with lowercase characters.
+ * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the
+ * first or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * Comment comment = Comment.newBuilder().build();
+ * String commentId = "commentId-1495016486";
+ * Comment response =
+ * gDCHardwareManagementClient.createCommentAsync(parent, comment, commentId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The order to create the comment on. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @param comment Required. The comment to create.
+ * @param commentId Optional. ID used to uniquely identify the Comment within its parent scope.
+ * This field should contain at most 63 characters and must start with lowercase characters.
+ * Only lowercase characters, numbers and `-` are accepted. The `-` character cannot be the
+ * first or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateCommentRequest request =
+ * CreateCommentRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setCommentId("commentId-1495016486")
+ * .setComment(Comment.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Comment response = gDCHardwareManagementClient.createCommentAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateCommentRequest request =
+ * CreateCommentRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setCommentId("commentId-1495016486")
+ * .setComment(Comment.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateCommentRequest request =
+ * CreateCommentRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setCommentId("commentId-1495016486")
+ * .setComment(Comment.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * OrderName parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]");
+ * for (ChangeLogEntry element :
+ * gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list change log entries for. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListChangeLogEntriesPagedResponse listChangeLogEntries(OrderName parent) {
+ ListChangeLogEntriesRequest request =
+ ListChangeLogEntriesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listChangeLogEntries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the changes made to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString();
+ * for (ChangeLogEntry element :
+ * gDCHardwareManagementClient.listChangeLogEntries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The order to list change log entries for. Format:
+ * `projects/{project}/locations/{location}/orders/{order}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListChangeLogEntriesPagedResponse listChangeLogEntries(String parent) {
+ ListChangeLogEntriesRequest request =
+ ListChangeLogEntriesRequest.newBuilder().setParent(parent).build();
+ return listChangeLogEntries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the changes made to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListChangeLogEntriesRequest request =
+ * ListChangeLogEntriesRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (ChangeLogEntry element :
+ * gDCHardwareManagementClient.listChangeLogEntries(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 ListChangeLogEntriesPagedResponse listChangeLogEntries(
+ ListChangeLogEntriesRequest request) {
+ return listChangeLogEntriesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the changes made to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListChangeLogEntriesRequest request =
+ * ListChangeLogEntriesRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListChangeLogEntriesRequest request =
+ * ListChangeLogEntriesRequest.newBuilder()
+ * .setParent(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListChangeLogEntriesResponse response =
+ * gDCHardwareManagementClient.listChangeLogEntriesCallable().call(request);
+ * for (ChangeLogEntry element : response.getChangeLogEntriesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ChangeLogEntryName name =
+ * ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]");
+ * ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the change log entry. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ChangeLogEntry getChangeLogEntry(ChangeLogEntryName name) {
+ GetChangeLogEntryRequest request =
+ GetChangeLogEntryRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getChangeLogEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a change to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name =
+ * ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]")
+ * .toString();
+ * ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the change log entry. Format:
+ * `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ChangeLogEntry getChangeLogEntry(String name) {
+ GetChangeLogEntryRequest request = GetChangeLogEntryRequest.newBuilder().setName(name).build();
+ return getChangeLogEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a change to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetChangeLogEntryRequest request =
+ * GetChangeLogEntryRequest.newBuilder()
+ * .setName(
+ * ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]")
+ * .toString())
+ * .build();
+ * ChangeLogEntry response = gDCHardwareManagementClient.getChangeLogEntry(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 ChangeLogEntry getChangeLogEntry(GetChangeLogEntryRequest request) {
+ return getChangeLogEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a change to an order.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetChangeLogEntryRequest request =
+ * GetChangeLogEntryRequest.newBuilder()
+ * .setName(
+ * ChangeLogEntryName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[CHANGE_LOG_ENTRY]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list SKUs in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkusPagedResponse listSkus(LocationName parent) {
+ ListSkusRequest request =
+ ListSkusRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSkus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SKUs for a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Sku element : gDCHardwareManagementClient.listSkus(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list SKUs in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkusPagedResponse listSkus(String parent) {
+ ListSkusRequest request = ListSkusRequest.newBuilder().setParent(parent).build();
+ return listSkus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SKUs for a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Sku element : gDCHardwareManagementClient.listSkus(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSkusPagedResponse listSkus(ListSkusRequest request) {
+ return listSkusPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists SKUs for a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListSkusRequest request =
+ * ListSkusRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSkusResponse response = gDCHardwareManagementClient.listSkusCallable().call(request);
+ * for (Sku element : response.getSkusList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SkuName name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]");
+ * Sku response = gDCHardwareManagementClient.getSku(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the SKU. Format:
+ * `projects/{project}/locations/{location}/skus/{sku}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Sku getSku(SkuName name) {
+ GetSkuRequest request =
+ GetSkuRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSku(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of an SKU.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString();
+ * Sku response = gDCHardwareManagementClient.getSku(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the SKU. Format:
+ * `projects/{project}/locations/{location}/skus/{sku}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Sku getSku(String name) {
+ GetSkuRequest request = GetSkuRequest.newBuilder().setName(name).build();
+ return getSku(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of an SKU.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetSkuRequest request =
+ * GetSkuRequest.newBuilder()
+ * .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString())
+ * .build();
+ * Sku response = gDCHardwareManagementClient.getSku(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Sku getSku(GetSkuRequest request) {
+ return getSkuCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of an SKU.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetSkuRequest request =
+ * GetSkuRequest.newBuilder()
+ * .setName(SkuName.of("[PROJECT]", "[LOCATION]", "[SKU]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list zones in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListZonesPagedResponse listZones(LocationName parent) {
+ ListZonesRequest request =
+ ListZonesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listZones(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists zones in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Zone element : gDCHardwareManagementClient.listZones(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to list zones in. Format:
+ * `projects/{project}/locations/{location}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListZonesPagedResponse listZones(String parent) {
+ ListZonesRequest request = ListZonesRequest.newBuilder().setParent(parent).build();
+ return listZones(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists zones in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListZonesRequest request =
+ * ListZonesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Zone element : gDCHardwareManagementClient.listZones(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 ListZonesPagedResponse listZones(ListZonesRequest request) {
+ return listZonesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists zones in a given project and location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListZonesRequest request =
+ * ListZonesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListZonesRequest request =
+ * ListZonesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListZonesResponse response = gDCHardwareManagementClient.listZonesCallable().call(request);
+ * for (Zone element : response.getZonesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+ * Zone response = gDCHardwareManagementClient.getZone(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Zone getZone(ZoneName name) {
+ GetZoneRequest request =
+ GetZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getZone(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+ * Zone response = gDCHardwareManagementClient.getZone(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Zone getZone(String name) {
+ GetZoneRequest request = GetZoneRequest.newBuilder().setName(name).build();
+ return getZone(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetZoneRequest request =
+ * GetZoneRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .build();
+ * Zone response = gDCHardwareManagementClient.getZone(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 Zone getZone(GetZoneRequest request) {
+ return getZoneCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a zone.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetZoneRequest request =
+ * GetZoneRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Zone zone = Zone.newBuilder().build();
+ * String zoneId = "zoneId-696323609";
+ * Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the zone in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param zone Required. The zone to create.
+ * @param zoneId Optional. ID used to uniquely identify the Zone within its parent scope. This
+ * field should contain at most 63 characters and must start with lowercase characters. Only
+ * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first
+ * or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Zone zone = Zone.newBuilder().build();
+ * String zoneId = "zoneId-696323609";
+ * Zone response = gDCHardwareManagementClient.createZoneAsync(parent, zone, zoneId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The project and location to create the zone in. Format:
+ * `projects/{project}/locations/{location}`
+ * @param zone Required. The zone to create.
+ * @param zoneId Optional. ID used to uniquely identify the Zone within its parent scope. This
+ * field should contain at most 63 characters and must start with lowercase characters. Only
+ * lowercase characters, numbers and `-` are accepted. The `-` character cannot be the first
+ * or the last one. A system generated ID will be used if the field is not set.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateZoneRequest request =
+ * CreateZoneRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setZoneId("zoneId-696323609")
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Zone response = gDCHardwareManagementClient.createZoneAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateZoneRequest request =
+ * CreateZoneRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setZoneId("zoneId-696323609")
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * CreateZoneRequest request =
+ * CreateZoneRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setZoneId("zoneId-696323609")
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * Zone zone = Zone.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Zone response = gDCHardwareManagementClient.updateZoneAsync(zone, updateMask).get();
+ * }
+ * }
+ *
+ * @param zone Required. The zone to update.
+ * @param updateMask Required. A mask to specify the fields in the Zone to overwrite with this
+ * update. The fields specified in the update_mask are relative to the zone, not the full
+ * request. A field will be overwritten if it is in the mask. If you don't provide a mask then
+ * all fields will be overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateZoneRequest request =
+ * UpdateZoneRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Zone response = gDCHardwareManagementClient.updateZoneAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateZoneRequest request =
+ * UpdateZoneRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * UpdateZoneRequest request =
+ * UpdateZoneRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setZone(Zone.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+ * gDCHardwareManagementClient.deleteZoneAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+ * gDCHardwareManagementClient.deleteZoneAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteZoneRequest request =
+ * DeleteZoneRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * gDCHardwareManagementClient.deleteZoneAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteZoneRequest request =
+ * DeleteZoneRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * DeleteZoneRequest request =
+ * DeleteZoneRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
+ * SignalZoneStateRequest.StateSignal stateSignal =
+ * SignalZoneStateRequest.StateSignal.forNumber(0);
+ * Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @param stateSignal Required. The state signal to send for this zone.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString();
+ * SignalZoneStateRequest.StateSignal stateSignal =
+ * SignalZoneStateRequest.StateSignal.forNumber(0);
+ * Zone response = gDCHardwareManagementClient.signalZoneStateAsync(name, stateSignal).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the zone. Format:
+ * `projects/{project}/locations/{location}/zones/{zone}`
+ * @param stateSignal Required. The state signal to send for this zone.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SignalZoneStateRequest request =
+ * SignalZoneStateRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Zone response = gDCHardwareManagementClient.signalZoneStateAsync(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 OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SignalZoneStateRequest request =
+ * SignalZoneStateRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * SignalZoneStateRequest request =
+ * SignalZoneStateRequest.newBuilder()
+ * .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : gDCHardwareManagementClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * gDCHardwareManagementClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = gDCHardwareManagementClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GDCHardwareManagementClient gDCHardwareManagementClient =
+ * GDCHardwareManagementClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * GDCHardwareManagementSettings.Builder gDCHardwareManagementSettingsBuilder =
+ * GDCHardwareManagementSettings.newBuilder();
+ * gDCHardwareManagementSettingsBuilder
+ * .getOrderSettings()
+ * .setRetrySettings(
+ * gDCHardwareManagementSettingsBuilder
+ * .getOrderSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * GDCHardwareManagementSettings gDCHardwareManagementSettings =
+ * gDCHardwareManagementSettingsBuilder.build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GDCHardwareManagementSettings extends ClientSettings