Class GDCHardwareManagementClient

java.lang.Object
com.google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagementClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class GDCHardwareManagementClient extends Object implements BackgroundResource
Service Description: The GDC Hardware Management service.

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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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().

Methods
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.

  • listOrders(ListOrdersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listOrders(LocationName parent)

  • listOrders(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listOrdersPagedCallable()

  • listOrdersCallable()

GetOrder

Gets details of an order.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getOrder(GetOrderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getOrder(OrderName name)

  • getOrder(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getOrderCallable()

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.

  • createOrderAsync(CreateOrderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createOrderAsync(LocationName parent, Order order, String orderId)

  • createOrderAsync(String parent, Order order, String orderId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createOrderOperationCallable()

  • createOrderCallable()

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.

  • updateOrderAsync(UpdateOrderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateOrderAsync(Order order, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateOrderOperationCallable()

  • updateOrderCallable()

DeleteOrder

Deletes an order.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteOrderAsync(DeleteOrderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteOrderAsync(OrderName name)

  • deleteOrderAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteOrderOperationCallable()

  • deleteOrderCallable()

SubmitOrder

Submits an order.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • submitOrderAsync(SubmitOrderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • submitOrderAsync(OrderName name)

  • submitOrderAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • submitOrderOperationCallable()

  • submitOrderCallable()

CancelOrder

Cancels an order.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • cancelOrderAsync(CancelOrderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • cancelOrderAsync(OrderName name)

  • cancelOrderAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • cancelOrderOperationCallable()

  • cancelOrderCallable()

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.

  • listSites(ListSitesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSites(LocationName parent)

  • listSites(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSitesPagedCallable()

  • listSitesCallable()

GetSite

Gets details of a site.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSite(GetSiteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSite(SiteName name)

  • getSite(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSiteCallable()

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.

  • createSiteAsync(CreateSiteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createSiteAsync(LocationName parent, Site site, String siteId)

  • createSiteAsync(String parent, Site site, String siteId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSiteOperationCallable()

  • createSiteCallable()

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.

  • updateSiteAsync(UpdateSiteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateSiteAsync(Site site, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSiteOperationCallable()

  • updateSiteCallable()

DeleteSite

Deletes a site.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSiteAsync(DeleteSiteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteSiteAsync(SiteName name)

  • deleteSiteAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSiteOperationCallable()

  • deleteSiteCallable()

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.

  • listHardwareGroups(ListHardwareGroupsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHardwareGroups(OrderName parent)

  • listHardwareGroups(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHardwareGroupsPagedCallable()

  • listHardwareGroupsCallable()

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.

  • getHardwareGroup(GetHardwareGroupRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getHardwareGroup(HardwareGroupName name)

  • getHardwareGroup(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getHardwareGroupCallable()

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.

  • createHardwareGroupAsync(CreateHardwareGroupRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createHardwareGroupAsync(OrderName parent, HardwareGroup hardwareGroup, String hardwareGroupId)

  • createHardwareGroupAsync(String parent, HardwareGroup hardwareGroup, String hardwareGroupId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createHardwareGroupOperationCallable()

  • createHardwareGroupCallable()

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.

  • updateHardwareGroupAsync(UpdateHardwareGroupRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateHardwareGroupAsync(HardwareGroup hardwareGroup, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateHardwareGroupOperationCallable()

  • updateHardwareGroupCallable()

DeleteHardwareGroup

Deletes a hardware group.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteHardwareGroupAsync(DeleteHardwareGroupRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteHardwareGroupAsync(HardwareGroupName name)

  • deleteHardwareGroupAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteHardwareGroupOperationCallable()

  • deleteHardwareGroupCallable()

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.

  • listHardware(ListHardwareRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHardware(LocationName parent)

  • listHardware(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHardwarePagedCallable()

  • listHardwareCallable()

GetHardware

Gets hardware details.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getHardware(GetHardwareRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getHardware(HardwareName name)

  • getHardware(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getHardwareCallable()

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.

  • createHardwareAsync(CreateHardwareRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createHardwareAsync(LocationName parent, Hardware hardware, String hardwareId)

  • createHardwareAsync(String parent, Hardware hardware, String hardwareId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createHardwareOperationCallable()

  • createHardwareCallable()

UpdateHardware

Updates hardware parameters.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateHardwareAsync(UpdateHardwareRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateHardwareAsync(Hardware hardware, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateHardwareOperationCallable()

  • updateHardwareCallable()

DeleteHardware

Deletes hardware.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteHardwareAsync(DeleteHardwareRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteHardwareAsync(HardwareName name)

  • deleteHardwareAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteHardwareOperationCallable()

  • deleteHardwareCallable()

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.

  • listComments(ListCommentsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listComments(OrderName parent)

  • listComments(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listCommentsPagedCallable()

  • listCommentsCallable()

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.

  • getComment(GetCommentRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getComment(CommentName name)

  • getComment(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCommentCallable()

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.

  • createCommentAsync(CreateCommentRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createCommentAsync(OrderName parent, Comment comment, String commentId)

  • createCommentAsync(String parent, Comment comment, String commentId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createCommentOperationCallable()

  • createCommentCallable()

RecordActionOnComment

Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • recordActionOnComment(RecordActionOnCommentRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • recordActionOnComment(CommentName name, RecordActionOnCommentRequest.ActionType actionType)

  • recordActionOnComment(String name, RecordActionOnCommentRequest.ActionType actionType)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • recordActionOnCommentCallable()

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.

  • listChangeLogEntries(ListChangeLogEntriesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listChangeLogEntries(OrderName parent)

  • listChangeLogEntries(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listChangeLogEntriesPagedCallable()

  • listChangeLogEntriesCallable()

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.

  • getChangeLogEntry(GetChangeLogEntryRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getChangeLogEntry(ChangeLogEntryName name)

  • getChangeLogEntry(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getChangeLogEntryCallable()

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.

  • listSkus(ListSkusRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSkus(LocationName parent)

  • listSkus(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSkusPagedCallable()

  • listSkusCallable()

GetSku

Gets details of an SKU.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSku(GetSkuRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSku(SkuName name)

  • getSku(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSkuCallable()

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.

  • listZones(ListZonesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listZones(LocationName parent)

  • listZones(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listZonesPagedCallable()

  • listZonesCallable()

GetZone

Gets details of a zone.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getZone(GetZoneRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getZone(ZoneName name)

  • getZone(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getZoneCallable()

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.

  • createZoneAsync(CreateZoneRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createZoneAsync(LocationName parent, Zone zone, String zoneId)

  • createZoneAsync(String parent, Zone zone, String zoneId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createZoneOperationCallable()

  • createZoneCallable()

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.

  • updateZoneAsync(UpdateZoneRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateZoneAsync(Zone zone, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateZoneOperationCallable()

  • updateZoneCallable()

DeleteZone

Deletes a zone.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteZoneAsync(DeleteZoneRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteZoneAsync(ZoneName name)

  • deleteZoneAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteZoneOperationCallable()

  • deleteZoneCallable()

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.

  • signalZoneStateAsync(SignalZoneStateRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • signalZoneStateAsync(ZoneName name, SignalZoneStateRequest.StateSignal stateSignal)

  • signalZoneStateAsync(String name, SignalZoneStateRequest.StateSignal stateSignal)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • signalZoneStateOperationCallable()

  • signalZoneStateCallable()

RequestOrderDateChange

Updates the requested date change of a single Order.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • requestOrderDateChangeAsync(OrderName name, Date requestedDate)

  • requestOrderDateChangeAsync(String name, Date requestedDate)

  • requestOrderDateChangeAsync(RequestOrderDateChangeRequest request)

  • requestOrderDateChangeOperationCallable()

  • requestOrderDateChangeCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of GDCHardwareManagementSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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.

  • Constructor Details

    • GDCHardwareManagementClient

      protected GDCHardwareManagementClient(GDCHardwareManagementSettings settings) throws IOException
      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.
      Throws:
      IOException
    • GDCHardwareManagementClient

      protected GDCHardwareManagementClient(GDCHardwareManagementStub stub)
  • Method Details

    • create

      public static final GDCHardwareManagementClient create() throws IOException
      Constructs an instance of GDCHardwareManagementClient with default settings.
      Throws:
      IOException
    • create

      public static final GDCHardwareManagementClient create(GDCHardwareManagementSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      public static final GDCHardwareManagementClient create(GDCHardwareManagementStub stub)
      Constructs an instance of GDCHardwareManagementClient, using the given stub for making calls. This is for advanced usage - prefer using create(GDCHardwareManagementSettings).
    • getSettings

      public final GDCHardwareManagementSettings getSettings()
    • getStub

      public GDCHardwareManagementStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listOrders

      Lists orders in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list orders in. Format: `projects/{project}/locations/{location}`

      To list orders across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listOrders

      Lists orders in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list orders in. Format: `projects/{project}/locations/{location}`

      To list orders across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listOrders

      Lists orders in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listOrdersPagedCallable

      Lists orders in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Order> future =
             gDCHardwareManagementClient.listOrdersPagedCallable().futureCall(request);
         // Do something.
         for (Order element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listOrdersCallable

      public final UnaryCallable<ListOrdersRequest,ListOrdersResponse> listOrdersCallable()
      Lists orders in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getOrder

      public final Order getOrder(OrderName name)
      Gets details of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getOrder

      public final Order getOrder(String name)
      Gets details of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getOrder

      public final Order getOrder(GetOrderRequest request)
      Gets details of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getOrderCallable

      public final UnaryCallable<GetOrderRequest,Order> getOrderCallable()
      Gets details of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Order> future = gDCHardwareManagementClient.getOrderCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • createOrderAsync

      public final OperationFuture<Order,OperationMetadata> createOrderAsync(LocationName parent, Order order, String orderId)
      Creates a new order in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the order in. Format: `projects/{project}/locations/{location}`
      order - Required. The order to create.
      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:
      ApiException - if the remote call fails
    • createOrderAsync

      public final OperationFuture<Order,OperationMetadata> createOrderAsync(String parent, Order order, String orderId)
      Creates a new order in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the order in. Format: `projects/{project}/locations/{location}`
      order - Required. The order to create.
      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:
      ApiException - if the remote call fails
    • createOrderAsync

      public final OperationFuture<Order,OperationMetadata> createOrderAsync(CreateOrderRequest request)
      Creates a new order in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createOrderOperationCallable

      public final OperationCallable<CreateOrderRequest,Order,OperationMetadata> createOrderOperationCallable()
      Creates a new order in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Order, OperationMetadata> future =
             gDCHardwareManagementClient.createOrderOperationCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • createOrderCallable

      public final UnaryCallable<CreateOrderRequest,Operation> createOrderCallable()
      Creates a new order in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createOrderCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateOrderAsync

      public final OperationFuture<Order,OperationMetadata> updateOrderAsync(Order order, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      order - Required. The order to update.
      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:
      ApiException - if the remote call fails
    • updateOrderAsync

      public final OperationFuture<Order,OperationMetadata> updateOrderAsync(UpdateOrderRequest request)
      Updates the parameters of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateOrderOperationCallable

      public final OperationCallable<UpdateOrderRequest,Order,OperationMetadata> updateOrderOperationCallable()
      Updates the parameters of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Order, OperationMetadata> future =
             gDCHardwareManagementClient.updateOrderOperationCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • updateOrderCallable

      public final UnaryCallable<UpdateOrderRequest,Operation> updateOrderCallable()
      Updates the parameters of an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.updateOrderCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteOrderAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(OrderName name)
      Deletes an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • deleteOrderAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(String name)
      Deletes an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • deleteOrderAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(DeleteOrderRequest request)
      Deletes an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteOrderOperationCallable

      public final OperationCallable<DeleteOrderRequest,com.google.protobuf.Empty,OperationMetadata> deleteOrderOperationCallable()
      Deletes an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Empty, OperationMetadata> future =
             gDCHardwareManagementClient.deleteOrderOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteOrderCallable

      public final UnaryCallable<DeleteOrderRequest,Operation> deleteOrderCallable()
      Deletes an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.deleteOrderCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • submitOrderAsync

      public final OperationFuture<Order,OperationMetadata> submitOrderAsync(OrderName name)
      Submits an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • submitOrderAsync

      public final OperationFuture<Order,OperationMetadata> submitOrderAsync(String name)
      Submits an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • submitOrderAsync

      public final OperationFuture<Order,OperationMetadata> submitOrderAsync(SubmitOrderRequest request)
      Submits an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • submitOrderOperationCallable

      public final OperationCallable<SubmitOrderRequest,Order,OperationMetadata> submitOrderOperationCallable()
      Submits an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Order, OperationMetadata> future =
             gDCHardwareManagementClient.submitOrderOperationCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • submitOrderCallable

      public final UnaryCallable<SubmitOrderRequest,Operation> submitOrderCallable()
      Submits an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.submitOrderCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • cancelOrderAsync

      public final OperationFuture<Order,OperationMetadata> cancelOrderAsync(OrderName name)
      Cancels an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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.cancelOrderAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • cancelOrderAsync

      public final OperationFuture<Order,OperationMetadata> cancelOrderAsync(String name)
      Cancels an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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.cancelOrderAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the order. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • cancelOrderAsync

      public final OperationFuture<Order,OperationMetadata> cancelOrderAsync(CancelOrderRequest request)
      Cancels an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         CancelOrderRequest request =
             CancelOrderRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         Order response = gDCHardwareManagementClient.cancelOrderAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • cancelOrderOperationCallable

      public final OperationCallable<CancelOrderRequest,Order,OperationMetadata> cancelOrderOperationCallable()
      Cancels an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         CancelOrderRequest request =
             CancelOrderRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Order, OperationMetadata> future =
             gDCHardwareManagementClient.cancelOrderOperationCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • cancelOrderCallable

      public final UnaryCallable<CancelOrderRequest,Operation> cancelOrderCallable()
      Cancels an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         CancelOrderRequest request =
             CancelOrderRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             gDCHardwareManagementClient.cancelOrderCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listSites

      Lists sites in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list sites in. Format: `projects/{project}/locations/{location}`

      To list sites across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listSites

      Lists sites in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list sites in. Format: `projects/{project}/locations/{location}`

      To list sites across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listSites

      Lists sites in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listSitesPagedCallable

      Lists sites in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Site> future =
             gDCHardwareManagementClient.listSitesPagedCallable().futureCall(request);
         // Do something.
         for (Site element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSitesCallable

      public final UnaryCallable<ListSitesRequest,ListSitesResponse> listSitesCallable()
      Lists sites in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getSite

      public final Site getSite(SiteName name)
      Gets details of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the site. Format: `projects/{project}/locations/{location}/sites/{site}`
      Throws:
      ApiException - if the remote call fails
    • getSite

      public final Site getSite(String name)
      Gets details of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the site. Format: `projects/{project}/locations/{location}/sites/{site}`
      Throws:
      ApiException - if the remote call fails
    • getSite

      public final Site getSite(GetSiteRequest request)
      Gets details of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSiteCallable

      public final UnaryCallable<GetSiteRequest,Site> getSiteCallable()
      Gets details of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Site> future = gDCHardwareManagementClient.getSiteCallable().futureCall(request);
         // Do something.
         Site response = future.get();
       }
       
    • createSiteAsync

      public final OperationFuture<Site,OperationMetadata> createSiteAsync(LocationName parent, Site site, String siteId)
      Creates a new site in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the site in. Format: `projects/{project}/locations/{location}`
      site - Required. The site to create.
      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.

      The site.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createSiteAsync

      public final OperationFuture<Site,OperationMetadata> createSiteAsync(String parent, Site site, String siteId)
      Creates a new site in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the site in. Format: `projects/{project}/locations/{location}`
      site - Required. The site to create.
      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.

      The site.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createSiteAsync

      public final OperationFuture<Site,OperationMetadata> createSiteAsync(CreateSiteRequest request)
      Creates a new site in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createSiteOperationCallable

      public final OperationCallable<CreateSiteRequest,Site,OperationMetadata> createSiteOperationCallable()
      Creates a new site in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Site, OperationMetadata> future =
             gDCHardwareManagementClient.createSiteOperationCallable().futureCall(request);
         // Do something.
         Site response = future.get();
       }
       
    • createSiteCallable

      public final UnaryCallable<CreateSiteRequest,Operation> createSiteCallable()
      Creates a new site in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createSiteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateSiteAsync

      public final OperationFuture<Site,OperationMetadata> updateSiteAsync(Site site, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      site - Required. The site to update.
      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:
      ApiException - if the remote call fails
    • updateSiteAsync

      public final OperationFuture<Site,OperationMetadata> updateSiteAsync(UpdateSiteRequest request)
      Updates the parameters of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSiteOperationCallable

      public final OperationCallable<UpdateSiteRequest,Site,OperationMetadata> updateSiteOperationCallable()
      Updates the parameters of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Site, OperationMetadata> future =
             gDCHardwareManagementClient.updateSiteOperationCallable().futureCall(request);
         // Do something.
         Site response = future.get();
       }
       
    • updateSiteCallable

      public final UnaryCallable<UpdateSiteRequest,Operation> updateSiteCallable()
      Updates the parameters of a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.updateSiteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteSiteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(SiteName name)
      Deletes a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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]");
         gDCHardwareManagementClient.deleteSiteAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the site. Format: `projects/{project}/locations/{location}/sites/{site}`
      Throws:
      ApiException - if the remote call fails
    • deleteSiteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(String name)
      Deletes a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
         gDCHardwareManagementClient.deleteSiteAsync(name).get();
       }
       
      Parameters:
      name - Required. The name of the site. Format: `projects/{project}/locations/{location}/sites/{site}`
      Throws:
      ApiException - if the remote call fails
    • deleteSiteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(DeleteSiteRequest request)
      Deletes a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteSiteRequest request =
             DeleteSiteRequest.newBuilder()
                 .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         gDCHardwareManagementClient.deleteSiteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSiteOperationCallable

      public final OperationCallable<DeleteSiteRequest,com.google.protobuf.Empty,OperationMetadata> deleteSiteOperationCallable()
      Deletes a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteSiteRequest request =
             DeleteSiteRequest.newBuilder()
                 .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gDCHardwareManagementClient.deleteSiteOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteSiteCallable

      public final UnaryCallable<DeleteSiteRequest,Operation> deleteSiteCallable()
      Deletes a site.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         DeleteSiteRequest request =
             DeleteSiteRequest.newBuilder()
                 .setName(SiteName.of("[PROJECT]", "[LOCATION]", "[SITE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             gDCHardwareManagementClient.deleteSiteCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listHardwareGroups

      Lists hardware groups in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list hardware groups in. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listHardwareGroups

      public final GDCHardwareManagementClient.ListHardwareGroupsPagedResponse listHardwareGroups(String parent)
      Lists hardware groups in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list hardware groups in. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listHardwareGroups

      Lists hardware groups in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listHardwareGroupsPagedCallable

      Lists hardware groups in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<HardwareGroup> future =
             gDCHardwareManagementClient.listHardwareGroupsPagedCallable().futureCall(request);
         // Do something.
         for (HardwareGroup element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listHardwareGroupsCallable

      public final UnaryCallable<ListHardwareGroupsRequest,ListHardwareGroupsResponse> listHardwareGroupsCallable()
      Lists hardware groups in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getHardwareGroup

      public final HardwareGroup getHardwareGroup(HardwareGroupName name)
      Gets details of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the hardware group. Format: `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
      Throws:
      ApiException - if the remote call fails
    • getHardwareGroup

      public final HardwareGroup getHardwareGroup(String name)
      Gets details of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the hardware group. Format: `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
      Throws:
      ApiException - if the remote call fails
    • getHardwareGroup

      public final HardwareGroup getHardwareGroup(GetHardwareGroupRequest request)
      Gets details of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getHardwareGroupCallable

      public final UnaryCallable<GetHardwareGroupRequest,HardwareGroup> getHardwareGroupCallable()
      Gets details of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<HardwareGroup> future =
             gDCHardwareManagementClient.getHardwareGroupCallable().futureCall(request);
         // Do something.
         HardwareGroup response = future.get();
       }
       
    • createHardwareGroupAsync

      public final OperationFuture<HardwareGroup,OperationMetadata> createHardwareGroupAsync(OrderName parent, HardwareGroup hardwareGroup, String hardwareGroupId)
      Creates a new hardware group in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The order to create the hardware group in. Format: `projects/{project}/locations/{location}/orders/{order}`
      hardwareGroup - Required. The hardware group to create.
      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.

      The hardware_group.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createHardwareGroupAsync

      public final OperationFuture<HardwareGroup,OperationMetadata> createHardwareGroupAsync(String parent, HardwareGroup hardwareGroup, String hardwareGroupId)
      Creates a new hardware group in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The order to create the hardware group in. Format: `projects/{project}/locations/{location}/orders/{order}`
      hardwareGroup - Required. The hardware group to create.
      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.

      The hardware_group.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createHardwareGroupAsync

      public final OperationFuture<HardwareGroup,OperationMetadata> createHardwareGroupAsync(CreateHardwareGroupRequest request)
      Creates a new hardware group in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createHardwareGroupOperationCallable

      public final OperationCallable<CreateHardwareGroupRequest,HardwareGroup,OperationMetadata> createHardwareGroupOperationCallable()
      Creates a new hardware group in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<HardwareGroup, OperationMetadata> future =
             gDCHardwareManagementClient.createHardwareGroupOperationCallable().futureCall(request);
         // Do something.
         HardwareGroup response = future.get();
       }
       
    • createHardwareGroupCallable

      public final UnaryCallable<CreateHardwareGroupRequest,Operation> createHardwareGroupCallable()
      Creates a new hardware group in a given order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createHardwareGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateHardwareGroupAsync

      public final OperationFuture<HardwareGroup,OperationMetadata> updateHardwareGroupAsync(HardwareGroup hardwareGroup, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      hardwareGroup - Required. The hardware group to update.
      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:
      ApiException - if the remote call fails
    • updateHardwareGroupAsync

      public final OperationFuture<HardwareGroup,OperationMetadata> updateHardwareGroupAsync(UpdateHardwareGroupRequest request)
      Updates the parameters of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateHardwareGroupOperationCallable

      public final OperationCallable<UpdateHardwareGroupRequest,HardwareGroup,OperationMetadata> updateHardwareGroupOperationCallable()
      Updates the parameters of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<HardwareGroup, OperationMetadata> future =
             gDCHardwareManagementClient.updateHardwareGroupOperationCallable().futureCall(request);
         // Do something.
         HardwareGroup response = future.get();
       }
       
    • updateHardwareGroupCallable

      public final UnaryCallable<UpdateHardwareGroupRequest,Operation> updateHardwareGroupCallable()
      Updates the parameters of a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.updateHardwareGroupCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteHardwareGroupAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareGroupAsync(HardwareGroupName name)
      Deletes a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the hardware group. Format: `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareGroupAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareGroupAsync(String name)
      Deletes a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the hardware group. Format: `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}`
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareGroupAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareGroupAsync(DeleteHardwareGroupRequest request)
      Deletes a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareGroupOperationCallable

      public final OperationCallable<DeleteHardwareGroupRequest,com.google.protobuf.Empty,OperationMetadata> deleteHardwareGroupOperationCallable()
      Deletes a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Empty, OperationMetadata> future =
             gDCHardwareManagementClient.deleteHardwareGroupOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteHardwareGroupCallable

      public final UnaryCallable<DeleteHardwareGroupRequest,Operation> deleteHardwareGroupCallable()
      Deletes a hardware group.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.deleteHardwareGroupCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listHardware

      Lists hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list hardware in. Format: `projects/{project}/locations/{location}`

      To list hardware across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listHardware

      Lists hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list hardware in. Format: `projects/{project}/locations/{location}`

      To list hardware across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listHardware

      Lists hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listHardwarePagedCallable

      Lists hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Hardware> future =
             gDCHardwareManagementClient.listHardwarePagedCallable().futureCall(request);
         // Do something.
         for (Hardware element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listHardwareCallable

      public final UnaryCallable<ListHardwareRequest,ListHardwareResponse> listHardwareCallable()
      Lists hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getHardware

      public final Hardware getHardware(HardwareName name)
      Gets hardware details.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the hardware. Format: `projects/{project}/locations/{location}/hardware/{hardware}`
      Throws:
      ApiException - if the remote call fails
    • getHardware

      public final Hardware getHardware(String name)
      Gets hardware details.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the hardware. Format: `projects/{project}/locations/{location}/hardware/{hardware}`
      Throws:
      ApiException - if the remote call fails
    • getHardware

      public final Hardware getHardware(GetHardwareRequest request)
      Gets hardware details.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getHardwareCallable

      public final UnaryCallable<GetHardwareRequest,Hardware> getHardwareCallable()
      Gets hardware details.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Hardware> future =
             gDCHardwareManagementClient.getHardwareCallable().futureCall(request);
         // Do something.
         Hardware response = future.get();
       }
       
    • createHardwareAsync

      public final OperationFuture<Hardware,OperationMetadata> createHardwareAsync(LocationName parent, Hardware hardware, String hardwareId)
      Creates new hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create hardware in. Format: `projects/{project}/locations/{location}`
      hardware - Required. The resource to create.
      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.

      The hardware.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createHardwareAsync

      public final OperationFuture<Hardware,OperationMetadata> createHardwareAsync(String parent, Hardware hardware, String hardwareId)
      Creates new hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create hardware in. Format: `projects/{project}/locations/{location}`
      hardware - Required. The resource to create.
      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.

      The hardware.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createHardwareAsync

      public final OperationFuture<Hardware,OperationMetadata> createHardwareAsync(CreateHardwareRequest request)
      Creates new hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createHardwareOperationCallable

      public final OperationCallable<CreateHardwareRequest,Hardware,OperationMetadata> createHardwareOperationCallable()
      Creates new hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Hardware, OperationMetadata> future =
             gDCHardwareManagementClient.createHardwareOperationCallable().futureCall(request);
         // Do something.
         Hardware response = future.get();
       }
       
    • createHardwareCallable

      public final UnaryCallable<CreateHardwareRequest,Operation> createHardwareCallable()
      Creates new hardware in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createHardwareCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateHardwareAsync

      public final OperationFuture<Hardware,OperationMetadata> updateHardwareAsync(Hardware hardware, com.google.protobuf.FieldMask updateMask)
      Updates hardware parameters.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      hardware - Required. The hardware to update.
      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:
      ApiException - if the remote call fails
    • updateHardwareAsync

      public final OperationFuture<Hardware,OperationMetadata> updateHardwareAsync(UpdateHardwareRequest request)
      Updates hardware parameters.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateHardwareOperationCallable

      public final OperationCallable<UpdateHardwareRequest,Hardware,OperationMetadata> updateHardwareOperationCallable()
      Updates hardware parameters.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Hardware, OperationMetadata> future =
             gDCHardwareManagementClient.updateHardwareOperationCallable().futureCall(request);
         // Do something.
         Hardware response = future.get();
       }
       
    • updateHardwareCallable

      public final UnaryCallable<UpdateHardwareRequest,Operation> updateHardwareCallable()
      Updates hardware parameters.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.updateHardwareCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteHardwareAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareAsync(HardwareName name)
      Deletes hardware.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the hardware. Format: `projects/{project}/locations/{location}/hardware/{hardware}`
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareAsync(String name)
      Deletes hardware.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the hardware. Format: `projects/{project}/locations/{location}/hardware/{hardware}`
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareAsync(DeleteHardwareRequest request)
      Deletes hardware.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteHardwareOperationCallable

      public final OperationCallable<DeleteHardwareRequest,com.google.protobuf.Empty,OperationMetadata> deleteHardwareOperationCallable()
      Deletes hardware.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Empty, OperationMetadata> future =
             gDCHardwareManagementClient.deleteHardwareOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteHardwareCallable

      public final UnaryCallable<DeleteHardwareRequest,Operation> deleteHardwareCallable()
      Deletes hardware.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.deleteHardwareCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listComments

      Lists the comments on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list comments on. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listComments

      Lists the comments on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list comments on. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listComments

      Lists the comments on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listCommentsPagedCallable

      Lists the comments on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Comment> future =
             gDCHardwareManagementClient.listCommentsPagedCallable().futureCall(request);
         // Do something.
         for (Comment element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listCommentsCallable

      public final UnaryCallable<ListCommentsRequest,ListCommentsResponse> listCommentsCallable()
      Lists the comments on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getComment

      public final Comment getComment(CommentName name)
      Gets the content of a comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the comment. Format: `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
      Throws:
      ApiException - if the remote call fails
    • getComment

      public final Comment getComment(String name)
      Gets the content of a comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the comment. Format: `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
      Throws:
      ApiException - if the remote call fails
    • getComment

      public final Comment getComment(GetCommentRequest request)
      Gets the content of a comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getCommentCallable

      public final UnaryCallable<GetCommentRequest,Comment> getCommentCallable()
      Gets the content of a comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Comment> future =
             gDCHardwareManagementClient.getCommentCallable().futureCall(request);
         // Do something.
         Comment response = future.get();
       }
       
    • createCommentAsync

      public final OperationFuture<Comment,OperationMetadata> createCommentAsync(OrderName parent, Comment comment, String commentId)
      Creates a new comment on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The order to create the comment on. Format: `projects/{project}/locations/{location}/orders/{order}`
      comment - Required. The comment to create.
      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.

      The comment.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createCommentAsync

      public final OperationFuture<Comment,OperationMetadata> createCommentAsync(String parent, Comment comment, String commentId)
      Creates a new comment on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The order to create the comment on. Format: `projects/{project}/locations/{location}/orders/{order}`
      comment - Required. The comment to create.
      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.

      The comment.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createCommentAsync

      public final OperationFuture<Comment,OperationMetadata> createCommentAsync(CreateCommentRequest request)
      Creates a new comment on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createCommentOperationCallable

      public final OperationCallable<CreateCommentRequest,Comment,OperationMetadata> createCommentOperationCallable()
      Creates a new comment on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Comment, OperationMetadata> future =
             gDCHardwareManagementClient.createCommentOperationCallable().futureCall(request);
         // Do something.
         Comment response = future.get();
       }
       
    • createCommentCallable

      public final UnaryCallable<CreateCommentRequest,Operation> createCommentCallable()
      Creates a new comment on an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createCommentCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • recordActionOnComment

      public final Comment recordActionOnComment(CommentName name, RecordActionOnCommentRequest.ActionType actionType)
      Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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]");
         RecordActionOnCommentRequest.ActionType actionType =
             RecordActionOnCommentRequest.ActionType.forNumber(0);
         Comment response = gDCHardwareManagementClient.recordActionOnComment(name, actionType);
       }
       
      Parameters:
      name - Required. The name of the comment. Format: `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
      actionType - Required. The action type of the recorded action.
      Throws:
      ApiException - if the remote call fails
    • recordActionOnComment

      public final Comment recordActionOnComment(String name, RecordActionOnCommentRequest.ActionType actionType)
      Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
         RecordActionOnCommentRequest.ActionType actionType =
             RecordActionOnCommentRequest.ActionType.forNumber(0);
         Comment response = gDCHardwareManagementClient.recordActionOnComment(name, actionType);
       }
       
      Parameters:
      name - Required. The name of the comment. Format: `projects/{project}/locations/{location}/orders/{order}/comments/{comment}`
      actionType - Required. The action type of the recorded action.
      Throws:
      ApiException - if the remote call fails
    • recordActionOnComment

      public final Comment recordActionOnComment(RecordActionOnCommentRequest request)
      Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         RecordActionOnCommentRequest request =
             RecordActionOnCommentRequest.newBuilder()
                 .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString())
                 .build();
         Comment response = gDCHardwareManagementClient.recordActionOnComment(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • recordActionOnCommentCallable

      public final UnaryCallable<RecordActionOnCommentRequest,Comment> recordActionOnCommentCallable()
      Record Action on a Comment. If the Action specified in the request is READ, the viewed time in the comment is set to the time the request was received. If the comment is already marked as read, subsequent calls will be ignored. If the Action is UNREAD, the viewed time is cleared from the comment.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         RecordActionOnCommentRequest request =
             RecordActionOnCommentRequest.newBuilder()
                 .setName(CommentName.of("[PROJECT]", "[LOCATION]", "[ORDER]", "[COMMENT]").toString())
                 .build();
         ApiFuture<Comment> future =
             gDCHardwareManagementClient.recordActionOnCommentCallable().futureCall(request);
         // Do something.
         Comment response = future.get();
       }
       
    • listChangeLogEntries

      Lists the changes made to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list change log entries for. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listChangeLogEntries

      public final GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse listChangeLogEntries(String parent)
      Lists the changes made to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The order to list change log entries for. Format: `projects/{project}/locations/{location}/orders/{order}`
      Throws:
      ApiException - if the remote call fails
    • listChangeLogEntries

      Lists the changes made to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listChangeLogEntriesPagedCallable

      Lists the changes made to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<ChangeLogEntry> future =
             gDCHardwareManagementClient.listChangeLogEntriesPagedCallable().futureCall(request);
         // Do something.
         for (ChangeLogEntry element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listChangeLogEntriesCallable

      public final UnaryCallable<ListChangeLogEntriesRequest,ListChangeLogEntriesResponse> listChangeLogEntriesCallable()
      Lists the changes made to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getChangeLogEntry

      public final ChangeLogEntry getChangeLogEntry(ChangeLogEntryName name)
      Gets details of a change to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the change log entry. Format: `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
      Throws:
      ApiException - if the remote call fails
    • getChangeLogEntry

      public final ChangeLogEntry getChangeLogEntry(String name)
      Gets details of a change to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the change log entry. Format: `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}`
      Throws:
      ApiException - if the remote call fails
    • getChangeLogEntry

      public final ChangeLogEntry getChangeLogEntry(GetChangeLogEntryRequest request)
      Gets details of a change to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getChangeLogEntryCallable

      public final UnaryCallable<GetChangeLogEntryRequest,ChangeLogEntry> getChangeLogEntryCallable()
      Gets details of a change to an order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<ChangeLogEntry> future =
             gDCHardwareManagementClient.getChangeLogEntryCallable().futureCall(request);
         // Do something.
         ChangeLogEntry response = future.get();
       }
       
    • listSkus

      Lists SKUs for a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list SKUs in. Format: `projects/{project}/locations/{location}`

      To list SKUs across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listSkus

      Lists SKUs for a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list SKUs in. Format: `projects/{project}/locations/{location}`

      To list SKUs across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listSkus

      Lists SKUs for a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listSkusPagedCallable

      Lists SKUs for a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Sku> future =
             gDCHardwareManagementClient.listSkusPagedCallable().futureCall(request);
         // Do something.
         for (Sku element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSkusCallable

      public final UnaryCallable<ListSkusRequest,ListSkusResponse> listSkusCallable()
      Lists SKUs for a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getSku

      public final Sku getSku(SkuName name)
      Gets details of an SKU.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the SKU. Format: `projects/{project}/locations/{location}/skus/{sku}`
      Throws:
      ApiException - if the remote call fails
    • getSku

      public final Sku getSku(String name)
      Gets details of an SKU.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the SKU. Format: `projects/{project}/locations/{location}/skus/{sku}`
      Throws:
      ApiException - if the remote call fails
    • getSku

      public final Sku getSku(GetSkuRequest request)
      Gets details of an SKU.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSkuCallable

      public final UnaryCallable<GetSkuRequest,Sku> getSkuCallable()
      Gets details of an SKU.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Sku> future = gDCHardwareManagementClient.getSkuCallable().futureCall(request);
         // Do something.
         Sku response = future.get();
       }
       
    • listZones

      Lists zones in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list zones in. Format: `projects/{project}/locations/{location}`

      To list zones across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listZones

      Lists zones in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      parent - Required. The project and location to list zones in. Format: `projects/{project}/locations/{location}`

      To list zones across all locations, substitute `-` (the hyphen or dash character) for the location and check the unreachable field in the response message.

      Throws:
      ApiException - if the remote call fails
    • listZones

      Lists zones in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listZonesPagedCallable

      Lists zones in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Zone> future =
             gDCHardwareManagementClient.listZonesPagedCallable().futureCall(request);
         // Do something.
         for (Zone element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listZonesCallable

      public final UnaryCallable<ListZonesRequest,ListZonesResponse> listZonesCallable()
      Lists zones in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getZone

      public final Zone getZone(ZoneName name)
      Gets details of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      Throws:
      ApiException - if the remote call fails
    • getZone

      public final Zone getZone(String name)
      Gets details of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      Throws:
      ApiException - if the remote call fails
    • getZone

      public final Zone getZone(GetZoneRequest request)
      Gets details of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getZoneCallable

      public final UnaryCallable<GetZoneRequest,Zone> getZoneCallable()
      Gets details of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Zone> future = gDCHardwareManagementClient.getZoneCallable().futureCall(request);
         // Do something.
         Zone response = future.get();
       }
       
    • createZoneAsync

      public final OperationFuture<Zone,OperationMetadata> createZoneAsync(LocationName parent, Zone zone, String zoneId)
      Creates a new zone in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the zone in. Format: `projects/{project}/locations/{location}`
      zone - Required. The zone to create.
      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.

      The zone.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createZoneAsync

      public final OperationFuture<Zone,OperationMetadata> createZoneAsync(String parent, Zone zone, String zoneId)
      Creates a new zone in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      parent - Required. The project and location to create the zone in. Format: `projects/{project}/locations/{location}`
      zone - Required. The zone to create.
      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.

      The zone.name field in the request will be ignored.

      Throws:
      ApiException - if the remote call fails
    • createZoneAsync

      public final OperationFuture<Zone,OperationMetadata> createZoneAsync(CreateZoneRequest request)
      Creates a new zone in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createZoneOperationCallable

      public final OperationCallable<CreateZoneRequest,Zone,OperationMetadata> createZoneOperationCallable()
      Creates a new zone in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Zone, OperationMetadata> future =
             gDCHardwareManagementClient.createZoneOperationCallable().futureCall(request);
         // Do something.
         Zone response = future.get();
       }
       
    • createZoneCallable

      public final UnaryCallable<CreateZoneRequest,Operation> createZoneCallable()
      Creates a new zone in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.createZoneCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateZoneAsync

      public final OperationFuture<Zone,OperationMetadata> updateZoneAsync(Zone zone, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      zone - Required. The zone to update.
      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:
      ApiException - if the remote call fails
    • updateZoneAsync

      public final OperationFuture<Zone,OperationMetadata> updateZoneAsync(UpdateZoneRequest request)
      Updates the parameters of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateZoneOperationCallable

      public final OperationCallable<UpdateZoneRequest,Zone,OperationMetadata> updateZoneOperationCallable()
      Updates the parameters of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Zone, OperationMetadata> future =
             gDCHardwareManagementClient.updateZoneOperationCallable().futureCall(request);
         // Do something.
         Zone response = future.get();
       }
       
    • updateZoneCallable

      public final UnaryCallable<UpdateZoneRequest,Operation> updateZoneCallable()
      Updates the parameters of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.updateZoneCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteZoneAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(ZoneName name)
      Deletes a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      Throws:
      ApiException - if the remote call fails
    • deleteZoneAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(String name)
      Deletes a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      Throws:
      ApiException - if the remote call fails
    • deleteZoneAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(DeleteZoneRequest request)
      Deletes a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteZoneOperationCallable

      public final OperationCallable<DeleteZoneRequest,com.google.protobuf.Empty,OperationMetadata> deleteZoneOperationCallable()
      Deletes a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Empty, OperationMetadata> future =
             gDCHardwareManagementClient.deleteZoneOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteZoneCallable

      public final UnaryCallable<DeleteZoneRequest,Operation> deleteZoneCallable()
      Deletes a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Operation> future =
             gDCHardwareManagementClient.deleteZoneCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • signalZoneStateAsync

      public final OperationFuture<Zone,OperationMetadata> signalZoneStateAsync(ZoneName name, SignalZoneStateRequest.StateSignal stateSignal)
      Signals the state of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      stateSignal - Optional. The state signal to send for this zone. Either state_signal or provisioning_state_signal must be set, but not both.
      Throws:
      ApiException - if the remote call fails
    • signalZoneStateAsync

      public final OperationFuture<Zone,OperationMetadata> signalZoneStateAsync(String name, SignalZoneStateRequest.StateSignal stateSignal)
      Signals the state of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
       }
       
      Parameters:
      name - Required. The name of the zone. Format: `projects/{project}/locations/{location}/zones/{zone}`
      stateSignal - Optional. The state signal to send for this zone. Either state_signal or provisioning_state_signal must be set, but not both.
      Throws:
      ApiException - if the remote call fails
    • signalZoneStateAsync

      public final OperationFuture<Zone,OperationMetadata> signalZoneStateAsync(SignalZoneStateRequest request)
      Signals the state of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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")
                 .setStep("step3540684")
                 .setDetails("details1557721666")
                 .build();
         Zone response = gDCHardwareManagementClient.signalZoneStateAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • signalZoneStateOperationCallable

      public final OperationCallable<SignalZoneStateRequest,Zone,OperationMetadata> signalZoneStateOperationCallable()
      Signals the state of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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")
                 .setStep("step3540684")
                 .setDetails("details1557721666")
                 .build();
         OperationFuture<Zone, OperationMetadata> future =
             gDCHardwareManagementClient.signalZoneStateOperationCallable().futureCall(request);
         // Do something.
         Zone response = future.get();
       }
       
    • signalZoneStateCallable

      public final UnaryCallable<SignalZoneStateRequest,Operation> signalZoneStateCallable()
      Signals the state of a zone.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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")
                 .setStep("step3540684")
                 .setDetails("details1557721666")
                 .build();
         ApiFuture<Operation> future =
             gDCHardwareManagementClient.signalZoneStateCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • requestOrderDateChangeAsync

      public final OperationFuture<Order,OperationMetadata> requestOrderDateChangeAsync(OrderName name, Date requestedDate)
      Updates the requested date change of a single Order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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]");
         Date requestedDate = Date.newBuilder().build();
         Order response =
             gDCHardwareManagementClient.requestOrderDateChangeAsync(name, requestedDate).get();
       }
       
      Parameters:
      name - Required. The name of the order to update. Format: projects/{project}/locations/{location}/orders/{order}
      requestedDate - Required. The date to which the customer or Google wants to set the scheduled installation date.
      Throws:
      ApiException - if the remote call fails
    • requestOrderDateChangeAsync

      public final OperationFuture<Order,OperationMetadata> requestOrderDateChangeAsync(String name, Date requestedDate)
      Updates the requested date change of a single Order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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();
         Date requestedDate = Date.newBuilder().build();
         Order response =
             gDCHardwareManagementClient.requestOrderDateChangeAsync(name, requestedDate).get();
       }
       
      Parameters:
      name - Required. The name of the order to update. Format: projects/{project}/locations/{location}/orders/{order}
      requestedDate - Required. The date to which the customer or Google wants to set the scheduled installation date.
      Throws:
      ApiException - if the remote call fails
    • requestOrderDateChangeAsync

      public final OperationFuture<Order,OperationMetadata> requestOrderDateChangeAsync(RequestOrderDateChangeRequest request)
      Updates the requested date change of a single Order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         RequestOrderDateChangeRequest request =
             RequestOrderDateChangeRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestedDate(Date.newBuilder().build())
                 .build();
         Order response = gDCHardwareManagementClient.requestOrderDateChangeAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • requestOrderDateChangeOperationCallable

      public final OperationCallable<RequestOrderDateChangeRequest,Order,OperationMetadata> requestOrderDateChangeOperationCallable()
      Updates the requested date change of a single Order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         RequestOrderDateChangeRequest request =
             RequestOrderDateChangeRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestedDate(Date.newBuilder().build())
                 .build();
         OperationFuture<Order, OperationMetadata> future =
             gDCHardwareManagementClient.requestOrderDateChangeOperationCallable().futureCall(request);
         // Do something.
         Order response = future.get();
       }
       
    • requestOrderDateChangeCallable

      public final UnaryCallable<RequestOrderDateChangeRequest,Operation> requestOrderDateChangeCallable()
      Updates the requested date change of a single Order.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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()) {
         RequestOrderDateChangeRequest request =
             RequestOrderDateChangeRequest.newBuilder()
                 .setName(OrderName.of("[PROJECT]", "[LOCATION]", "[ORDER]").toString())
                 .setRequestedDate(Date.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gDCHardwareManagementClient.requestOrderDateChangeCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Location> future =
             gDCHardwareManagementClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying 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<Location> future =
             gDCHardwareManagementClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException