@Generated(value="by gapic-generator-java") public class HubServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
Hub response = hubServiceClient.getHub(name);
}
Note: close() needs to be called on the HubServiceClient 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 |
|---|---|---|
| ListHubs | Lists the Network Connectivity Center hubs associated with a given project. |
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.
|
| GetHub | Gets details about a Network Connectivity Center hub. |
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.
|
| CreateHub | Creates a new Network Connectivity Center hub in the specified project. |
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.
|
| UpdateHub | Updates the description and/or labels of a Network Connectivity Center hub. |
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.
|
| DeleteHub | Deletes a Network Connectivity Center hub. |
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.
|
| ListHubSpokes | Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted. |
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.
|
| ListSpokes | Lists the Network Connectivity Center spokes in a specified 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.
|
| GetSpoke | Gets details about a Network Connectivity Center spoke. |
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.
|
| CreateSpoke | Creates a Network Connectivity Center spoke. |
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.
|
| UpdateSpoke | Updates the parameters of a Network Connectivity Center spoke. |
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.
|
| RejectHubSpoke | Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub. |
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.
|
| AcceptHubSpoke | Accepts a proposal to attach a Network Connectivity Center spoke to a hub. |
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.
|
| DeleteSpoke | Deletes a Network Connectivity Center spoke. |
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.
|
| GetRouteTable | Gets details about a Network Connectivity Center route table. |
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.
|
| GetRoute | Gets details about the specified route. |
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.
|
| ListRoutes | Lists routes in a given project. |
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.
|
| ListRouteTables | Lists route tables in a given project. |
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.
|
| GetGroup | Gets details about a Network Connectivity Center 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.
|
| ListGroups | Lists groups in a given hub. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| ListLocations | Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| GetLocation | Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
| SetIamPolicy | Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
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.
|
| GetIamPolicy | Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
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.
|
| TestIamPermissions | Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
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 HubServiceSettings 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
HubServiceSettings hubServiceSettings =
HubServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
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
HubServiceSettings hubServiceSettings =
HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier | Constructor and Description |
|---|---|
protected |
HubServiceClient(HubServiceSettings settings)
Constructs an instance of HubServiceClient, using the given settings.
|
protected |
HubServiceClient(HubServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeAsync(AcceptHubSpokeRequest request)
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeAsync(HubName name,
SpokeName spokeUri)
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeAsync(HubName name,
String spokeUri)
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeAsync(String name,
SpokeName spokeUri)
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeAsync(String name,
String spokeUri)
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.rpc.UnaryCallable<AcceptHubSpokeRequest,com.google.longrunning.Operation> |
acceptHubSpokeCallable()
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
com.google.api.gax.rpc.OperationCallable<AcceptHubSpokeRequest,AcceptHubSpokeResponse,OperationMetadata> |
acceptHubSpokeOperationCallable()
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.
|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static HubServiceClient |
create()
Constructs an instance of HubServiceClient with default settings.
|
static HubServiceClient |
create(HubServiceSettings settings)
Constructs an instance of HubServiceClient, using the given settings.
|
static HubServiceClient |
create(HubServiceStub stub)
Constructs an instance of HubServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> |
createHubAsync(CreateHubRequest request)
Creates a new Network Connectivity Center hub in the specified project.
|
com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> |
createHubAsync(LocationName parent,
Hub hub,
String hubId)
Creates a new Network Connectivity Center hub in the specified project.
|
com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> |
createHubAsync(String parent,
Hub hub,
String hubId)
Creates a new Network Connectivity Center hub in the specified project.
|
com.google.api.gax.rpc.UnaryCallable<CreateHubRequest,com.google.longrunning.Operation> |
createHubCallable()
Creates a new Network Connectivity Center hub in the specified project.
|
com.google.api.gax.rpc.OperationCallable<CreateHubRequest,Hub,OperationMetadata> |
createHubOperationCallable()
Creates a new Network Connectivity Center hub in the specified project.
|
com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> |
createSpokeAsync(CreateSpokeRequest request)
Creates a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> |
createSpokeAsync(LocationName parent,
Spoke spoke,
String spokeId)
Creates a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> |
createSpokeAsync(String parent,
Spoke spoke,
String spokeId)
Creates a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.UnaryCallable<CreateSpokeRequest,com.google.longrunning.Operation> |
createSpokeCallable()
Creates a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.OperationCallable<CreateSpokeRequest,Spoke,OperationMetadata> |
createSpokeOperationCallable()
Creates a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteHubAsync(DeleteHubRequest request)
Deletes a Network Connectivity Center hub.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteHubAsync(HubName name)
Deletes a Network Connectivity Center hub.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteHubAsync(String name)
Deletes a Network Connectivity Center hub.
|
com.google.api.gax.rpc.UnaryCallable<DeleteHubRequest,com.google.longrunning.Operation> |
deleteHubCallable()
Deletes a Network Connectivity Center hub.
|
com.google.api.gax.rpc.OperationCallable<DeleteHubRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteHubOperationCallable()
Deletes a Network Connectivity Center hub.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSpokeAsync(DeleteSpokeRequest request)
Deletes a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSpokeAsync(SpokeName name)
Deletes a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSpokeAsync(String name)
Deletes a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSpokeRequest,com.google.longrunning.Operation> |
deleteSpokeCallable()
Deletes a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.OperationCallable<DeleteSpokeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteSpokeOperationCallable()
Deletes a Network Connectivity Center spoke.
|
Group |
getGroup(GetGroupRequest request)
Gets details about a Network Connectivity Center group.
|
Group |
getGroup(GroupName name)
Gets details about a Network Connectivity Center group.
|
Group |
getGroup(String name)
Gets details about a Network Connectivity Center group.
|
com.google.api.gax.rpc.UnaryCallable<GetGroupRequest,Group> |
getGroupCallable()
Gets details about a Network Connectivity Center group.
|
Hub |
getHub(GetHubRequest request)
Gets details about a Network Connectivity Center hub.
|
Hub |
getHub(HubName name)
Gets details about a Network Connectivity Center hub.
|
Hub |
getHub(String name)
Gets details about a Network Connectivity Center hub.
|
com.google.api.gax.rpc.UnaryCallable<GetHubRequest,Hub> |
getHubCallable()
Gets details about a Network Connectivity Center hub.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for a resource.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
Route |
getRoute(GetRouteRequest request)
Gets details about the specified route.
|
Route |
getRoute(HubRouteName name)
Gets details about the specified route.
|
Route |
getRoute(String name)
Gets details about the specified route.
|
com.google.api.gax.rpc.UnaryCallable<GetRouteRequest,Route> |
getRouteCallable()
Gets details about the specified route.
|
RouteTable |
getRouteTable(GetRouteTableRequest request)
Gets details about a Network Connectivity Center route table.
|
RouteTable |
getRouteTable(RouteTableName name)
Gets details about a Network Connectivity Center route table.
|
RouteTable |
getRouteTable(String name)
Gets details about a Network Connectivity Center route table.
|
com.google.api.gax.rpc.UnaryCallable<GetRouteTableRequest,RouteTable> |
getRouteTableCallable()
Gets details about a Network Connectivity Center route table.
|
HubServiceSettings |
getSettings() |
Spoke |
getSpoke(GetSpokeRequest request)
Gets details about a Network Connectivity Center spoke.
|
Spoke |
getSpoke(SpokeName name)
Gets details about a Network Connectivity Center spoke.
|
Spoke |
getSpoke(String name)
Gets details about a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.UnaryCallable<GetSpokeRequest,Spoke> |
getSpokeCallable()
Gets details about a Network Connectivity Center spoke.
|
HubServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
HubServiceClient.ListGroupsPagedResponse |
listGroups(HubName parent)
Lists groups in a given hub.
|
HubServiceClient.ListGroupsPagedResponse |
listGroups(ListGroupsRequest request)
Lists groups in a given hub.
|
HubServiceClient.ListGroupsPagedResponse |
listGroups(String parent)
Lists groups in a given hub.
|
com.google.api.gax.rpc.UnaryCallable<ListGroupsRequest,ListGroupsResponse> |
listGroupsCallable()
Lists groups in a given hub.
|
com.google.api.gax.rpc.UnaryCallable<ListGroupsRequest,HubServiceClient.ListGroupsPagedResponse> |
listGroupsPagedCallable()
Lists groups in a given hub.
|
HubServiceClient.ListHubsPagedResponse |
listHubs(ListHubsRequest request)
Lists the Network Connectivity Center hubs associated with a given project.
|
HubServiceClient.ListHubsPagedResponse |
listHubs(LocationName parent)
Lists the Network Connectivity Center hubs associated with a given project.
|
HubServiceClient.ListHubsPagedResponse |
listHubs(String parent)
Lists the Network Connectivity Center hubs associated with a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListHubsRequest,ListHubsResponse> |
listHubsCallable()
Lists the Network Connectivity Center hubs associated with a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListHubsRequest,HubServiceClient.ListHubsPagedResponse> |
listHubsPagedCallable()
Lists the Network Connectivity Center hubs associated with a given project.
|
HubServiceClient.ListHubSpokesPagedResponse |
listHubSpokes(HubName name)
Lists the Network Connectivity Center spokes associated with a specified hub and location.
|
HubServiceClient.ListHubSpokesPagedResponse |
listHubSpokes(ListHubSpokesRequest request)
Lists the Network Connectivity Center spokes associated with a specified hub and location.
|
HubServiceClient.ListHubSpokesPagedResponse |
listHubSpokes(String name)
Lists the Network Connectivity Center spokes associated with a specified hub and location.
|
com.google.api.gax.rpc.UnaryCallable<ListHubSpokesRequest,ListHubSpokesResponse> |
listHubSpokesCallable()
Lists the Network Connectivity Center spokes associated with a specified hub and location.
|
com.google.api.gax.rpc.UnaryCallable<ListHubSpokesRequest,HubServiceClient.ListHubSpokesPagedResponse> |
listHubSpokesPagedCallable()
Lists the Network Connectivity Center spokes associated with a specified hub and location.
|
HubServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,HubServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
HubServiceClient.ListRoutesPagedResponse |
listRoutes(ListRoutesRequest request)
Lists routes in a given project.
|
HubServiceClient.ListRoutesPagedResponse |
listRoutes(RouteTableName parent)
Lists routes in a given project.
|
HubServiceClient.ListRoutesPagedResponse |
listRoutes(String parent)
Lists routes in a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListRoutesRequest,ListRoutesResponse> |
listRoutesCallable()
Lists routes in a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListRoutesRequest,HubServiceClient.ListRoutesPagedResponse> |
listRoutesPagedCallable()
Lists routes in a given project.
|
HubServiceClient.ListRouteTablesPagedResponse |
listRouteTables(HubName parent)
Lists route tables in a given project.
|
HubServiceClient.ListRouteTablesPagedResponse |
listRouteTables(ListRouteTablesRequest request)
Lists route tables in a given project.
|
HubServiceClient.ListRouteTablesPagedResponse |
listRouteTables(String parent)
Lists route tables in a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListRouteTablesRequest,ListRouteTablesResponse> |
listRouteTablesCallable()
Lists route tables in a given project.
|
com.google.api.gax.rpc.UnaryCallable<ListRouteTablesRequest,HubServiceClient.ListRouteTablesPagedResponse> |
listRouteTablesPagedCallable()
Lists route tables in a given project.
|
HubServiceClient.ListSpokesPagedResponse |
listSpokes(ListSpokesRequest request)
Lists the Network Connectivity Center spokes in a specified project and location.
|
HubServiceClient.ListSpokesPagedResponse |
listSpokes(LocationName parent)
Lists the Network Connectivity Center spokes in a specified project and location.
|
HubServiceClient.ListSpokesPagedResponse |
listSpokes(String parent)
Lists the Network Connectivity Center spokes in a specified project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListSpokesRequest,ListSpokesResponse> |
listSpokesCallable()
Lists the Network Connectivity Center spokes in a specified project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListSpokesRequest,HubServiceClient.ListSpokesPagedResponse> |
listSpokesPagedCallable()
Lists the Network Connectivity Center spokes in a specified project and location.
|
com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeAsync(HubName name,
SpokeName spokeUri)
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeAsync(HubName name,
String spokeUri)
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeAsync(RejectHubSpokeRequest request)
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeAsync(String name,
SpokeName spokeUri)
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeAsync(String name,
String spokeUri)
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.rpc.UnaryCallable<RejectHubSpokeRequest,com.google.longrunning.Operation> |
rejectHubSpokeCallable()
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.api.gax.rpc.OperationCallable<RejectHubSpokeRequest,RejectHubSpokeResponse,OperationMetadata> |
rejectHubSpokeOperationCallable()
Rejects a Network Connectivity Center spoke from being attached to a hub.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on the specified resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> |
updateHubAsync(Hub hub,
com.google.protobuf.FieldMask updateMask)
Updates the description and/or labels of a Network Connectivity Center hub.
|
com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> |
updateHubAsync(UpdateHubRequest request)
Updates the description and/or labels of a Network Connectivity Center hub.
|
com.google.api.gax.rpc.UnaryCallable<UpdateHubRequest,com.google.longrunning.Operation> |
updateHubCallable()
Updates the description and/or labels of a Network Connectivity Center hub.
|
com.google.api.gax.rpc.OperationCallable<UpdateHubRequest,Hub,OperationMetadata> |
updateHubOperationCallable()
Updates the description and/or labels of a Network Connectivity Center hub.
|
com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> |
updateSpokeAsync(Spoke spoke,
com.google.protobuf.FieldMask updateMask)
Updates the parameters of a Network Connectivity Center spoke.
|
com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> |
updateSpokeAsync(UpdateSpokeRequest request)
Updates the parameters of a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSpokeRequest,com.google.longrunning.Operation> |
updateSpokeCallable()
Updates the parameters of a Network Connectivity Center spoke.
|
com.google.api.gax.rpc.OperationCallable<UpdateSpokeRequest,Spoke,OperationMetadata> |
updateSpokeOperationCallable()
Updates the parameters of a Network Connectivity Center spoke.
|
protected HubServiceClient(HubServiceSettings settings) throws IOException
IOExceptionprotected HubServiceClient(HubServiceStub stub)
public static final HubServiceClient create() throws IOException
IOExceptionpublic static final HubServiceClient create(HubServiceSettings settings) throws IOException
IOExceptionpublic static final HubServiceClient create(HubServiceStub stub)
public final HubServiceSettings getSettings()
public HubServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
public final HubServiceClient.ListHubsPagedResponse listHubs(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListHubsPagedResponse listHubs(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListHubsPagedResponse listHubs(ListHubsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubsRequest request =
ListHubsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Hub element : hubServiceClient.listHubs(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListHubsRequest,HubServiceClient.ListHubsPagedResponse> listHubsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubsRequest request =
ListHubsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Hub> future = hubServiceClient.listHubsPagedCallable().futureCall(request);
// Do something.
for (Hub element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListHubsRequest,ListHubsResponse> listHubsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubsRequest request =
ListHubsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListHubsResponse response = hubServiceClient.listHubsCallable().call(request);
for (Hub element : response.getHubsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Hub getHub(HubName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
Hub response = hubServiceClient.getHub(name);
}
name - Required. The name of the hub resource to get.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Hub getHub(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
Hub response = hubServiceClient.getHub(name);
}
name - Required. The name of the hub resource to get.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Hub getHub(GetHubRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetHubRequest request =
GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build();
Hub response = hubServiceClient.getHub(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetHubRequest,Hub> getHubCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetHubRequest request =
GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build();
ApiFuture<Hub> future = hubServiceClient.getHubCallable().futureCall(request);
// Do something.
Hub response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> createHubAsync(LocationName parent, Hub hub, String hubId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Hub hub = Hub.newBuilder().build();
String hubId = "hubId99628272";
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
}
parent - Required. The parent resource.hub - Required. The initial values for a new hub.hubId - Required. A unique identifier for the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> createHubAsync(String parent, Hub hub, String hubId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Hub hub = Hub.newBuilder().build();
String hubId = "hubId99628272";
Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
}
parent - Required. The parent resource.hub - Required. The initial values for a new hub.hubId - Required. A unique identifier for the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> createHubAsync(CreateHubRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateHubRequest request =
CreateHubRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHubId("hubId99628272")
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Hub response = hubServiceClient.createHubAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateHubRequest,Hub,OperationMetadata> createHubOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateHubRequest request =
CreateHubRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHubId("hubId99628272")
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Hub, OperationMetadata> future =
hubServiceClient.createHubOperationCallable().futureCall(request);
// Do something.
Hub response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateHubRequest,com.google.longrunning.Operation> createHubCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateHubRequest request =
CreateHubRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHubId("hubId99628272")
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.createHubCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> updateHubAsync(Hub hub, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
Hub hub = Hub.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get();
}
hub - Required. The state that the hub should be in after the update.updateMask - Optional. In the case of an update to an existing hub, field mask is used to
specify the fields to be overwritten. The fields specified in the update_mask are relative
to the resource, not the full request. A field is overwritten if it is in the mask. If the
user does not provide a mask, then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Hub,OperationMetadata> updateHubAsync(UpdateHubRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateHubRequest request =
UpdateHubRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Hub response = hubServiceClient.updateHubAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateHubRequest,Hub,OperationMetadata> updateHubOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateHubRequest request =
UpdateHubRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Hub, OperationMetadata> future =
hubServiceClient.updateHubOperationCallable().futureCall(request);
// Do something.
Hub response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateHubRequest,com.google.longrunning.Operation> updateHubCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateHubRequest request =
UpdateHubRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setHub(Hub.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.updateHubCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(HubName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
hubServiceClient.deleteHubAsync(name).get();
}
name - Required. The name of the hub to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
hubServiceClient.deleteHubAsync(name).get();
}
name - Required. The name of the hub to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(DeleteHubRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteHubRequest request =
DeleteHubRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setRequestId("requestId693933066")
.build();
hubServiceClient.deleteHubAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteHubRequest,com.google.protobuf.Empty,OperationMetadata> deleteHubOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteHubRequest request =
DeleteHubRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
hubServiceClient.deleteHubOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteHubRequest,com.google.longrunning.Operation> deleteHubCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteHubRequest request =
DeleteHubRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.deleteHubCallable().futureCall(request);
// Do something.
future.get();
}
public final HubServiceClient.ListHubSpokesPagedResponse listHubSpokes(HubName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
// doThingsWith(element);
}
}
name - Required. The name of the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListHubSpokesPagedResponse listHubSpokes(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) {
// doThingsWith(element);
}
}
name - Required. The name of the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListHubSpokesPagedResponse listHubSpokes(ListHubSpokesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubSpokesRequest request =
ListHubSpokesRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.addAllSpokeLocations(new ArrayList<String>())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Spoke element : hubServiceClient.listHubSpokes(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListHubSpokesRequest,HubServiceClient.ListHubSpokesPagedResponse> listHubSpokesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubSpokesRequest request =
ListHubSpokesRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.addAllSpokeLocations(new ArrayList<String>())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Spoke> future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request);
// Do something.
for (Spoke element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListHubSpokesRequest,ListHubSpokesResponse> listHubSpokesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListHubSpokesRequest request =
ListHubSpokesRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.addAllSpokeLocations(new ArrayList<String>())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request);
for (Spoke element : response.getSpokesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final HubServiceClient.ListSpokesPagedResponse listSpokes(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListSpokesPagedResponse listSpokes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListSpokesPagedResponse listSpokes(ListSpokesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListSpokesRequest request =
ListSpokesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSpokesRequest,HubServiceClient.ListSpokesPagedResponse> listSpokesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListSpokesRequest request =
ListSpokesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Spoke> future = hubServiceClient.listSpokesPagedCallable().futureCall(request);
// Do something.
for (Spoke element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSpokesRequest,ListSpokesResponse> listSpokesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListSpokesRequest request =
ListSpokesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request);
for (Spoke element : response.getSpokesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Spoke getSpoke(SpokeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
Spoke response = hubServiceClient.getSpoke(name);
}
name - Required. The name of the spoke resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Spoke getSpoke(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
Spoke response = hubServiceClient.getSpoke(name);
}
name - Required. The name of the spoke resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Spoke getSpoke(GetSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetSpokeRequest request =
GetSpokeRequest.newBuilder()
.setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.build();
Spoke response = hubServiceClient.getSpoke(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSpokeRequest,Spoke> getSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetSpokeRequest request =
GetSpokeRequest.newBuilder()
.setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.build();
ApiFuture<Spoke> future = hubServiceClient.getSpokeCallable().futureCall(request);
// Do something.
Spoke response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> createSpokeAsync(LocationName parent, Spoke spoke, String spokeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Spoke spoke = Spoke.newBuilder().build();
String spokeId = "spokeId-1998996281";
Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
}
parent - Required. The parent resource.spoke - Required. The initial values for a new spoke.spokeId - Required. Unique id for the spoke to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> createSpokeAsync(String parent, Spoke spoke, String spokeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Spoke spoke = Spoke.newBuilder().build();
String spokeId = "spokeId-1998996281";
Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
}
parent - Required. The parent resource.spoke - Required. The initial values for a new spoke.spokeId - Required. Unique id for the spoke to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> createSpokeAsync(CreateSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateSpokeRequest request =
CreateSpokeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSpokeId("spokeId-1998996281")
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Spoke response = hubServiceClient.createSpokeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateSpokeRequest,Spoke,OperationMetadata> createSpokeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateSpokeRequest request =
CreateSpokeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSpokeId("spokeId-1998996281")
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Spoke, OperationMetadata> future =
hubServiceClient.createSpokeOperationCallable().futureCall(request);
// Do something.
Spoke response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateSpokeRequest,com.google.longrunning.Operation> createSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
CreateSpokeRequest request =
CreateSpokeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSpokeId("spokeId-1998996281")
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.createSpokeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> updateSpokeAsync(Spoke spoke, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
Spoke spoke = Spoke.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get();
}
spoke - Required. The state that the spoke should be in after the update.updateMask - Optional. In the case of an update to an existing spoke, field mask is used
to specify the fields to be overwritten. The fields specified in the update_mask are
relative to the resource, not the full request. A field is overwritten if it is in the
mask. If the user does not provide a mask, then all fields are overwritten.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Spoke,OperationMetadata> updateSpokeAsync(UpdateSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateSpokeRequest request =
UpdateSpokeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Spoke response = hubServiceClient.updateSpokeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateSpokeRequest,Spoke,OperationMetadata> updateSpokeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateSpokeRequest request =
UpdateSpokeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<Spoke, OperationMetadata> future =
hubServiceClient.updateSpokeOperationCallable().futureCall(request);
// Do something.
Spoke response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateSpokeRequest,com.google.longrunning.Operation> updateSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
UpdateSpokeRequest request =
UpdateSpokeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSpoke(Spoke.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.updateSpokeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(HubName name, SpokeName spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub from which to reject the spoke.spokeUri - Required. The URI of the spoke to reject from the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(HubName name, String spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub from which to reject the spoke.spokeUri - Required. The URI of the spoke to reject from the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(String name, SpokeName spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub from which to reject the spoke.spokeUri - Required. The URI of the spoke to reject from the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(String name, String spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub from which to reject the spoke.spokeUri - Required. The URI of the spoke to reject from the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(RejectHubSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
RejectHubSpokeRequest request =
RejectHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.setDetails("details1557721666")
.build();
RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RejectHubSpokeRequest,RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
RejectHubSpokeRequest request =
RejectHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.setDetails("details1557721666")
.build();
OperationFuture<RejectHubSpokeResponse, OperationMetadata> future =
hubServiceClient.rejectHubSpokeOperationCallable().futureCall(request);
// Do something.
RejectHubSpokeResponse response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<RejectHubSpokeRequest,com.google.longrunning.Operation> rejectHubSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
RejectHubSpokeRequest request =
RejectHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.setDetails("details1557721666")
.build();
ApiFuture<Operation> future = hubServiceClient.rejectHubSpokeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(HubName name, SpokeName spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub into which to accept the spoke.spokeUri - Required. The URI of the spoke to accept into the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(HubName name, String spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName name = HubName.of("[PROJECT]", "[HUB]");
String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub into which to accept the spoke.spokeUri - Required. The URI of the spoke to accept into the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(String name, SpokeName spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub into which to accept the spoke.spokeUri - Required. The URI of the spoke to accept into the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(String name, String spokeUri)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubName.of("[PROJECT]", "[HUB]").toString();
String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
}
name - Required. The name of the hub into which to accept the spoke.spokeUri - Required. The URI of the spoke to accept into the hub.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(AcceptHubSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
AcceptHubSpokeRequest request =
AcceptHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<AcceptHubSpokeRequest,AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
AcceptHubSpokeRequest request =
AcceptHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<AcceptHubSpokeResponse, OperationMetadata> future =
hubServiceClient.acceptHubSpokeOperationCallable().futureCall(request);
// Do something.
AcceptHubSpokeResponse response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<AcceptHubSpokeRequest,com.google.longrunning.Operation> acceptHubSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
AcceptHubSpokeRequest request =
AcceptHubSpokeRequest.newBuilder()
.setName(HubName.of("[PROJECT]", "[HUB]").toString())
.setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.acceptHubSpokeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(SpokeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
hubServiceClient.deleteSpokeAsync(name).get();
}
name - Required. The name of the spoke to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
hubServiceClient.deleteSpokeAsync(name).get();
}
name - Required. The name of the spoke to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(DeleteSpokeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteSpokeRequest request =
DeleteSpokeRequest.newBuilder()
.setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
hubServiceClient.deleteSpokeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteSpokeRequest,com.google.protobuf.Empty,OperationMetadata> deleteSpokeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteSpokeRequest request =
DeleteSpokeRequest.newBuilder()
.setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
hubServiceClient.deleteSpokeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteSpokeRequest,com.google.longrunning.Operation> deleteSpokeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
DeleteSpokeRequest request =
DeleteSpokeRequest.newBuilder()
.setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = hubServiceClient.deleteSpokeCallable().futureCall(request);
// Do something.
future.get();
}
public final RouteTable getRouteTable(RouteTableName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
RouteTable response = hubServiceClient.getRouteTable(name);
}
name - Required. The name of the route table resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RouteTable getRouteTable(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
RouteTable response = hubServiceClient.getRouteTable(name);
}
name - Required. The name of the route table resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RouteTable getRouteTable(GetRouteTableRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetRouteTableRequest request =
GetRouteTableRequest.newBuilder()
.setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
.build();
RouteTable response = hubServiceClient.getRouteTable(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetRouteTableRequest,RouteTable> getRouteTableCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetRouteTableRequest request =
GetRouteTableRequest.newBuilder()
.setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
.build();
ApiFuture<RouteTable> future = hubServiceClient.getRouteTableCallable().futureCall(request);
// Do something.
RouteTable response = future.get();
}
public final Route getRoute(HubRouteName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
Route response = hubServiceClient.getRoute(name);
}
name - Required. The name of the route resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Route getRoute(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString();
Route response = hubServiceClient.getRoute(name);
}
name - Required. The name of the route resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Route getRoute(GetRouteRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetRouteRequest request =
GetRouteRequest.newBuilder()
.setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
.build();
Route response = hubServiceClient.getRoute(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetRouteRequest,Route> getRouteCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetRouteRequest request =
GetRouteRequest.newBuilder()
.setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
.build();
ApiFuture<Route> future = hubServiceClient.getRouteCallable().futureCall(request);
// Do something.
Route response = future.get();
}
public final HubServiceClient.ListRoutesPagedResponse listRoutes(RouteTableName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListRoutesPagedResponse listRoutes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListRoutesPagedResponse listRoutes(ListRoutesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRoutesRequest request =
ListRoutesRequest.newBuilder()
.setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Route element : hubServiceClient.listRoutes(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListRoutesRequest,HubServiceClient.ListRoutesPagedResponse> listRoutesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRoutesRequest request =
ListRoutesRequest.newBuilder()
.setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Route> future = hubServiceClient.listRoutesPagedCallable().futureCall(request);
// Do something.
for (Route element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListRoutesRequest,ListRoutesResponse> listRoutesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRoutesRequest request =
ListRoutesRequest.newBuilder()
.setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRoutesResponse response = hubServiceClient.listRoutesCallable().call(request);
for (Route element : response.getRoutesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final HubServiceClient.ListRouteTablesPagedResponse listRouteTables(HubName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName parent = HubName.of("[PROJECT]", "[HUB]");
for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListRouteTablesPagedResponse listRouteTables(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = HubName.of("[PROJECT]", "[HUB]").toString();
for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListRouteTablesPagedResponse listRouteTables(ListRouteTablesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRouteTablesRequest request =
ListRouteTablesRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (RouteTable element : hubServiceClient.listRouteTables(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListRouteTablesRequest,HubServiceClient.ListRouteTablesPagedResponse> listRouteTablesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRouteTablesRequest request =
ListRouteTablesRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<RouteTable> future =
hubServiceClient.listRouteTablesPagedCallable().futureCall(request);
// Do something.
for (RouteTable element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListRouteTablesRequest,ListRouteTablesResponse> listRouteTablesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListRouteTablesRequest request =
ListRouteTablesRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRouteTablesResponse response = hubServiceClient.listRouteTablesCallable().call(request);
for (RouteTable element : response.getRouteTablesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Group getGroup(GroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]");
Group response = hubServiceClient.getGroup(name);
}
name - Required. The name of the route table resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Group getGroup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString();
Group response = hubServiceClient.getGroup(name);
}
name - Required. The name of the route table resource.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Group getGroup(GetGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetGroupRequest request =
GetGroupRequest.newBuilder()
.setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.build();
Group response = hubServiceClient.getGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetGroupRequest,Group> getGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetGroupRequest request =
GetGroupRequest.newBuilder()
.setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.build();
ApiFuture<Group> future = hubServiceClient.getGroupCallable().futureCall(request);
// Do something.
Group response = future.get();
}
public final HubServiceClient.ListGroupsPagedResponse listGroups(HubName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
HubName parent = HubName.of("[PROJECT]", "[HUB]");
for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListGroupsPagedResponse listGroups(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
String parent = HubName.of("[PROJECT]", "[HUB]").toString();
for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent resource's name.com.google.api.gax.rpc.ApiException - if the remote call failspublic final HubServiceClient.ListGroupsPagedResponse listGroups(ListGroupsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListGroupsRequest request =
ListGroupsRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Group element : hubServiceClient.listGroups(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListGroupsRequest,HubServiceClient.ListGroupsPagedResponse> listGroupsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListGroupsRequest request =
ListGroupsRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Group> future = hubServiceClient.listGroupsPagedCallable().futureCall(request);
// Do something.
for (Group element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListGroupsRequest,ListGroupsResponse> listGroupsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListGroupsRequest request =
ListGroupsRequest.newBuilder()
.setParent(HubName.of("[PROJECT]", "[HUB]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListGroupsResponse response = hubServiceClient.listGroupsCallable().call(request);
for (Group element : response.getGroupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final HubServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : hubServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,HubServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
hubServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = hubServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = hubServiceClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = hubServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = hubServiceClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = hubServiceClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = hubServiceClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = hubServiceClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = hubServiceClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
hubServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.