Class GDCHardwareManagementClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| Method | Description | Method Variants |
|---|---|---|
ListOrders |
Lists orders in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetOrder |
Gets details of an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateOrder |
Creates a new order in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateOrder |
Updates the parameters of an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteOrder |
Deletes an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SubmitOrder |
Submits an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CancelOrder |
Cancels an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSites |
Lists sites in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSite |
Gets details of a site. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSite |
Creates a new site in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSite |
Updates the parameters of a site. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSite |
Deletes a site. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListHardwareGroups |
Lists hardware groups in a given order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetHardwareGroup |
Gets details of a hardware group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateHardwareGroup |
Creates a new hardware group in a given order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateHardwareGroup |
Updates the parameters of a hardware group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHardwareGroup |
Deletes a hardware group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListHardware |
Lists hardware in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetHardware |
Gets hardware details. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateHardware |
Creates new hardware in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateHardware |
Updates hardware parameters. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHardware |
Deletes hardware. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListComments |
Lists the comments on an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetComment |
Gets the content of a comment. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateComment |
Creates a new comment on an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListChangeLogEntries |
Lists the changes made to an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetChangeLogEntry |
Gets details of a change to an order. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSkus |
Lists SKUs for a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSku |
Gets details of an SKU. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListZones |
Lists zones in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetZone |
Gets details of a zone. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateZone |
Creates a new zone in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateZone |
Updates the parameters of a zone. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteZone |
Deletes a zone. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SignalZoneState |
Signals the state of a zone. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of GDCHardwareManagementSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of GDCHardwareManagementClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) cancelOrderAsync(CancelOrderRequest request) Cancels an order.cancelOrderAsync(OrderName name) Cancels an order.cancelOrderAsync(String name) Cancels an order.Cancels an order.Cancels an order.final voidclose()static final GDCHardwareManagementClientcreate()Constructs an instance of GDCHardwareManagementClient with default settings.static final GDCHardwareManagementClientcreate(GDCHardwareManagementSettings settings) Constructs an instance of GDCHardwareManagementClient, using the given settings.static final GDCHardwareManagementClientConstructs an instance of GDCHardwareManagementClient, using the given stub for making calls.createCommentAsync(CreateCommentRequest request) Creates a new comment on an order.createCommentAsync(OrderName parent, Comment comment, String commentId) Creates a new comment on an order.createCommentAsync(String parent, Comment comment, String commentId) Creates a new comment on an order.Creates a new comment on an order.Creates a new comment on an order.createHardwareAsync(CreateHardwareRequest request) Creates new hardware in a given project and location.createHardwareAsync(LocationName parent, Hardware hardware, String hardwareId) Creates new hardware in a given project and location.createHardwareAsync(String parent, Hardware hardware, String hardwareId) Creates new hardware in a given project and location.Creates new hardware in a given project and location.Creates a new hardware group in a given order.createHardwareGroupAsync(OrderName parent, HardwareGroup hardwareGroup, String hardwareGroupId) Creates a new hardware group in a given order.createHardwareGroupAsync(String parent, HardwareGroup hardwareGroup, String hardwareGroupId) Creates a new hardware group in a given order.Creates a new hardware group in a given order.Creates a new hardware group in a given order.Creates new hardware in a given project and location.createOrderAsync(CreateOrderRequest request) Creates a new order in a given project and location.createOrderAsync(LocationName parent, Order order, String orderId) Creates a new order in a given project and location.createOrderAsync(String parent, Order order, String orderId) Creates a new order in a given project and location.Creates a new order in a given project and location.Creates a new order in a given project and location.final OperationFuture<Site,OperationMetadata> createSiteAsync(CreateSiteRequest request) Creates a new site in a given project and location.final OperationFuture<Site,OperationMetadata> createSiteAsync(LocationName parent, Site site, String siteId) Creates a new site in a given project and location.final OperationFuture<Site,OperationMetadata> createSiteAsync(String parent, Site site, String siteId) Creates a new site in a given project and location.Creates a new site in a given project and location.Creates a new site in a given project and location.final OperationFuture<Zone,OperationMetadata> createZoneAsync(CreateZoneRequest request) Creates a new zone in a given project and location.final OperationFuture<Zone,OperationMetadata> createZoneAsync(LocationName parent, Zone zone, String zoneId) Creates a new zone in a given project and location.final OperationFuture<Zone,OperationMetadata> createZoneAsync(String parent, Zone zone, String zoneId) Creates a new zone in a given project and location.Creates a new zone in a given project and location.Creates a new zone in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareAsync(DeleteHardwareRequest request) Deletes hardware.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes hardware.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHardwareAsync(String name) Deletes hardware.Deletes hardware.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a hardware group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a hardware group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a hardware group.Deletes a hardware group.final OperationCallable<DeleteHardwareGroupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a hardware group.final OperationCallable<DeleteHardwareRequest,com.google.protobuf.Empty, OperationMetadata> Deletes hardware.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(DeleteOrderRequest request) Deletes an order.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(OrderName name) Deletes an order.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteOrderAsync(String name) Deletes an order.Deletes an order.final OperationCallable<DeleteOrderRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an order.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(DeleteSiteRequest request) Deletes a site.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(SiteName name) Deletes a site.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSiteAsync(String name) Deletes a site.Deletes a site.final OperationCallable<DeleteSiteRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a site.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(DeleteZoneRequest request) Deletes a zone.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(ZoneName name) Deletes a zone.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteZoneAsync(String name) Deletes a zone.Deletes a zone.final OperationCallable<DeleteZoneRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a zone.final ChangeLogEntryGets details of a change to an order.final ChangeLogEntryGets details of a change to an order.final ChangeLogEntrygetChangeLogEntry(String name) Gets details of a change to an order.Gets details of a change to an order.final CommentgetComment(CommentName name) Gets the content of a comment.final CommentgetComment(GetCommentRequest request) Gets the content of a comment.final CommentgetComment(String name) Gets the content of a comment.Gets the content of a comment.final HardwaregetHardware(GetHardwareRequest request) Gets hardware details.final HardwaregetHardware(HardwareName name) Gets hardware details.final HardwaregetHardware(String name) Gets hardware details.Gets hardware details.final HardwareGroupgetHardwareGroup(GetHardwareGroupRequest request) Gets details of a hardware group.final HardwareGroupGets details of a hardware group.final HardwareGroupgetHardwareGroup(String name) Gets details of a hardware group.Gets details of a hardware group.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final OrdergetOrder(GetOrderRequest request) Gets details of an order.final OrderGets details of an order.final OrderGets details of an order.final UnaryCallable<GetOrderRequest,Order> Gets details of an order.final SitegetSite(GetSiteRequest request) Gets details of a site.final SiteGets details of a site.final SiteGets details of a site.final UnaryCallable<GetSiteRequest,Site> Gets details of a site.final SkugetSku(GetSkuRequest request) Gets details of an SKU.final SkuGets details of an SKU.final SkuGets details of an SKU.final UnaryCallable<GetSkuRequest,Sku> Gets details of an SKU.getStub()final ZonegetZone(GetZoneRequest request) Gets details of a zone.final ZoneGets details of a zone.final ZoneGets details of a zone.final UnaryCallable<GetZoneRequest,Zone> Gets details of a zone.booleanbooleanLists the changes made to an order.listChangeLogEntries(OrderName parent) Lists the changes made to an order.listChangeLogEntries(String parent) Lists the changes made to an order.Lists the changes made to an order.final UnaryCallable<ListChangeLogEntriesRequest,GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse> Lists the changes made to an order.listComments(ListCommentsRequest request) Lists the comments on an order.listComments(OrderName parent) Lists the comments on an order.listComments(String parent) Lists the comments on an order.Lists the comments on an order.Lists the comments on an order.listHardware(ListHardwareRequest request) Lists hardware in a given project and location.listHardware(LocationName parent) Lists hardware in a given project and location.listHardware(String parent) Lists hardware in a given project and location.Lists hardware in a given project and location.Lists hardware groups in a given order.listHardwareGroups(OrderName parent) Lists hardware groups in a given order.listHardwareGroups(String parent) Lists hardware groups in a given order.Lists hardware groups in a given order.final UnaryCallable<ListHardwareGroupsRequest,GDCHardwareManagementClient.ListHardwareGroupsPagedResponse> Lists hardware groups in a given order.Lists hardware in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listOrders(ListOrdersRequest request) Lists orders in a given project and location.listOrders(LocationName parent) Lists orders in a given project and location.listOrders(String parent) Lists orders in a given project and location.Lists orders in a given project and location.Lists orders in a given project and location.listSites(ListSitesRequest request) Lists sites in a given project and location.listSites(LocationName parent) Lists sites in a given project and location.Lists sites in a given project and location.Lists sites in a given project and location.Lists sites in a given project and location.listSkus(ListSkusRequest request) Lists SKUs for a given project and location.listSkus(LocationName parent) Lists SKUs for a given project and location.Lists SKUs for a given project and location.Lists SKUs for a given project and location.Lists SKUs for a given project and location.listZones(ListZonesRequest request) Lists zones in a given project and location.listZones(LocationName parent) Lists zones in a given project and location.Lists zones in a given project and location.Lists zones in a given project and location.Lists zones in a given project and location.final CommentrecordActionOnComment(CommentName name, RecordActionOnCommentRequest.ActionType actionType) Record Action on a Comment.final CommentRecord Action on a Comment.final CommentrecordActionOnComment(String name, RecordActionOnCommentRequest.ActionType actionType) Record Action on a Comment.Record Action on a Comment.requestOrderDateChangeAsync(OrderName name, Date requestedDate) Updates the requested date change of a single Order.Updates the requested date change of a single Order.requestOrderDateChangeAsync(String name, Date requestedDate) Updates the requested date change of a single Order.Updates the requested date change of a single Order.Updates the requested date change of a single Order.voidshutdown()voidfinal OperationFuture<Zone,OperationMetadata> Signals the state of a zone.final OperationFuture<Zone,OperationMetadata> signalZoneStateAsync(ZoneName name, SignalZoneStateRequest.StateSignal stateSignal) Signals the state of a zone.final OperationFuture<Zone,OperationMetadata> signalZoneStateAsync(String name, SignalZoneStateRequest.StateSignal stateSignal) Signals the state of a zone.Signals the state of a zone.Signals the state of a zone.submitOrderAsync(OrderName name) Submits an order.submitOrderAsync(SubmitOrderRequest request) Submits an order.submitOrderAsync(String name) Submits an order.Submits an order.Submits an order.updateHardwareAsync(Hardware hardware, com.google.protobuf.FieldMask updateMask) Updates hardware parameters.updateHardwareAsync(UpdateHardwareRequest request) Updates hardware parameters.Updates hardware parameters.updateHardwareGroupAsync(HardwareGroup hardwareGroup, com.google.protobuf.FieldMask updateMask) Updates the parameters of a hardware group.Updates the parameters of a hardware group.Updates the parameters of a hardware group.Updates the parameters of a hardware group.Updates hardware parameters.updateOrderAsync(Order order, com.google.protobuf.FieldMask updateMask) Updates the parameters of an order.updateOrderAsync(UpdateOrderRequest request) Updates the parameters of an order.Updates the parameters of an order.Updates the parameters of an order.final OperationFuture<Site,OperationMetadata> updateSiteAsync(Site site, com.google.protobuf.FieldMask updateMask) Updates the parameters of a site.final OperationFuture<Site,OperationMetadata> updateSiteAsync(UpdateSiteRequest request) Updates the parameters of a site.Updates the parameters of a site.Updates the parameters of a site.final OperationFuture<Zone,OperationMetadata> updateZoneAsync(UpdateZoneRequest request) Updates the parameters of a zone.final OperationFuture<Zone,OperationMetadata> updateZoneAsync(Zone zone, com.google.protobuf.FieldMask updateMask) Updates the parameters of a zone.Updates the parameters of a zone.Updates the parameters of a zone.
-
Constructor Details
-
GDCHardwareManagementClient
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
-
-
Method Details
-
create
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
Constructs an instance of GDCHardwareManagementClient, using the given stub for making calls. This is for advanced usage - prefer using create(GDCHardwareManagementSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
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
public final GDCHardwareManagementClient.ListOrdersPagedResponse listOrders(ListOrdersRequest request) 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
public final UnaryCallable<ListOrdersRequest,GDCHardwareManagementClient.ListOrdersPagedResponse> 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
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
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
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
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
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
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, createOrderOperationCallable()OperationMetadata> 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
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
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, updateOrderOperationCallable()OperationMetadata> 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
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, deleteOrderOperationCallable()OperationMetadata> 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
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
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
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
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, submitOrderOperationCallable()OperationMetadata> 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
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
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
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
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, cancelOrderOperationCallable()OperationMetadata> 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
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
public final UnaryCallable<ListSitesRequest,GDCHardwareManagementClient.ListSitesPagedResponse> 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
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
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
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
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
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
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, createSiteOperationCallable()OperationMetadata> 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
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
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, updateSiteOperationCallable()OperationMetadata> 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
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, deleteSiteOperationCallable()OperationMetadata> 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
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
public final GDCHardwareManagementClient.ListHardwareGroupsPagedResponse listHardwareGroups(OrderName 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()) { 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
public final GDCHardwareManagementClient.ListHardwareGroupsPagedResponse listHardwareGroups(ListHardwareGroupsRequest request) 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
public final UnaryCallable<ListHardwareGroupsRequest,GDCHardwareManagementClient.ListHardwareGroupsPagedResponse> 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
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
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
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
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, createHardwareGroupOperationCallable()OperationMetadata> 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
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, updateHardwareGroupOperationCallable()OperationMetadata> 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
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, deleteHardwareGroupOperationCallable()OperationMetadata> 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
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
public final GDCHardwareManagementClient.ListHardwarePagedResponse listHardware(LocationName parent) 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
public final GDCHardwareManagementClient.ListHardwarePagedResponse listHardware(ListHardwareRequest request) 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
public final UnaryCallable<ListHardwareRequest,GDCHardwareManagementClient.ListHardwarePagedResponse> 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
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
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
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
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
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, createHardwareOperationCallable()OperationMetadata> 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
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, updateHardwareOperationCallable()OperationMetadata> 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
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, deleteHardwareOperationCallable()OperationMetadata> 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
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
public final GDCHardwareManagementClient.ListCommentsPagedResponse listComments(ListCommentsRequest request) 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
public final UnaryCallable<ListCommentsRequest,GDCHardwareManagementClient.ListCommentsPagedResponse> 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
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
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
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
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
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, createCommentOperationCallable()OperationMetadata> 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
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
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
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
public final GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse listChangeLogEntries(OrderName 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()) { 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
public final GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse listChangeLogEntries(ListChangeLogEntriesRequest request) 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
public final UnaryCallable<ListChangeLogEntriesRequest,GDCHardwareManagementClient.ListChangeLogEntriesPagedResponse> 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
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
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
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
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
public final UnaryCallable<ListSkusRequest,GDCHardwareManagementClient.ListSkusPagedResponse> 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
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
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
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
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
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
public final UnaryCallable<ListZonesRequest,GDCHardwareManagementClient.ListZonesPagedResponse> 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
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
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
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
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
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
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, createZoneOperationCallable()OperationMetadata> 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
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
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, updateZoneOperationCallable()OperationMetadata> 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
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, deleteZoneOperationCallable()OperationMetadata> 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
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, signalZoneStateOperationCallable()OperationMetadata> 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
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, requestOrderDateChangeOperationCallable()OperationMetadata> 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
public final GDCHardwareManagementClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) 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
public final UnaryCallable<ListLocationsRequest,GDCHardwareManagementClient.ListLocationsPagedResponse> 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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-