Class HubServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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.
|
QueryHubStatus |
Query the Private Service Connect propagation status of 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.
|
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.
|
AcceptSpokeUpdate |
Accepts a proposal to update a Network Connectivity Center spoke in 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.
|
RejectSpokeUpdate |
Rejects a proposal to update a Network Connectivity Center spoke in 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 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.
|
ListRouteTables |
Lists route tables 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.
|
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.
|
UpdateGroup |
Updates the parameters of a Network Connectivity Center group. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHubServiceClient(HubServiceSettings settings) Constructs an instance of HubServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionacceptHubSpokeAsync(AcceptHubSpokeRequest request) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.acceptHubSpokeAsync(HubName name, SpokeName spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.acceptHubSpokeAsync(HubName name, String spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.acceptHubSpokeAsync(String name, SpokeName spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.acceptHubSpokeAsync(String name, String spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Accepts a proposal to update a Network Connectivity Center spoke in a hub.acceptSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.acceptSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.acceptSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.acceptSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Accepts a proposal to update a Network Connectivity Center spoke in a hub.Accepts a proposal to update a Network Connectivity Center spoke in a hub.booleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final HubServiceClientcreate()Constructs an instance of HubServiceClient with default settings.static final HubServiceClientcreate(HubServiceSettings settings) Constructs an instance of HubServiceClient, using the given settings.static final HubServiceClientcreate(HubServiceStub stub) Constructs an instance of HubServiceClient, using the given stub for making calls.final OperationFuture<Hub,OperationMetadata> createHubAsync(CreateHubRequest request) Creates a new Network Connectivity Center hub in the specified project.final OperationFuture<Hub,OperationMetadata> createHubAsync(LocationName parent, Hub hub, String hubId) Creates a new Network Connectivity Center hub in the specified project.final OperationFuture<Hub,OperationMetadata> createHubAsync(String parent, Hub hub, String hubId) Creates a new Network Connectivity Center hub in the specified project.Creates a new Network Connectivity Center hub in the specified project.Creates a new Network Connectivity Center hub in the specified project.createSpokeAsync(CreateSpokeRequest request) Creates a Network Connectivity Center spoke.createSpokeAsync(LocationName parent, Spoke spoke, String spokeId) Creates a Network Connectivity Center spoke.createSpokeAsync(String parent, Spoke spoke, String spokeId) Creates a Network Connectivity Center spoke.Creates a Network Connectivity Center spoke.Creates a Network Connectivity Center spoke.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(DeleteHubRequest request) Deletes a Network Connectivity Center hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(HubName name) Deletes a Network Connectivity Center hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(String name) Deletes a Network Connectivity Center hub.Deletes a Network Connectivity Center hub.final OperationCallable<DeleteHubRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Network Connectivity Center hub.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(DeleteSpokeRequest request) Deletes a Network Connectivity Center spoke.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(SpokeName name) Deletes a Network Connectivity Center spoke.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(String name) Deletes a Network Connectivity Center spoke.Deletes a Network Connectivity Center spoke.final OperationCallable<DeleteSpokeRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Network Connectivity Center spoke.final GroupgetGroup(GetGroupRequest request) Gets details about a Network Connectivity Center group.final GroupGets details about a Network Connectivity Center group.final GroupGets details about a Network Connectivity Center group.final UnaryCallable<GetGroupRequest,Group> Gets details about a Network Connectivity Center group.final HubgetHub(GetHubRequest request) Gets details about a Network Connectivity Center hub.final HubGets details about a Network Connectivity Center hub.final HubGets details about a Network Connectivity Center hub.final UnaryCallable<GetHubRequest,Hub> Gets details about a Network Connectivity Center hub.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final RoutegetRoute(GetRouteRequest request) Gets details about the specified route.final RoutegetRoute(HubRouteName name) Gets details about the specified route.final RouteGets details about the specified route.final UnaryCallable<GetRouteRequest,Route> Gets details about the specified route.final RouteTablegetRouteTable(GetRouteTableRequest request) Gets details about a Network Connectivity Center route table.final RouteTablegetRouteTable(RouteTableName name) Gets details about a Network Connectivity Center route table.final RouteTablegetRouteTable(String name) Gets details about a Network Connectivity Center route table.Gets details about a Network Connectivity Center route table.final HubServiceSettingsfinal SpokegetSpoke(GetSpokeRequest request) Gets details about a Network Connectivity Center spoke.final SpokeGets details about a Network Connectivity Center spoke.final SpokeGets details about a Network Connectivity Center spoke.final UnaryCallable<GetSpokeRequest,Spoke> Gets details about a Network Connectivity Center spoke.getStub()booleanbooleanlistGroups(HubName parent) Lists groups in a given hub.listGroups(ListGroupsRequest request) Lists groups in a given hub.listGroups(String parent) Lists groups in a given hub.Lists groups in a given hub.Lists groups in a given hub.listHubs(ListHubsRequest request) Lists the Network Connectivity Center hubs associated with a given project.listHubs(LocationName parent) Lists the Network Connectivity Center hubs associated with a given project.Lists the Network Connectivity Center hubs associated with a given project.Lists the Network Connectivity Center hubs associated with a given project.Lists the Network Connectivity Center hubs associated with a given project.listHubSpokes(HubName name) Lists the Network Connectivity Center spokes associated with a specified hub and location.listHubSpokes(ListHubSpokesRequest request) Lists the Network Connectivity Center spokes associated with a specified hub and location.listHubSpokes(String name) Lists the Network Connectivity Center spokes associated with a specified hub and location.Lists the Network Connectivity Center spokes associated with a specified hub and location.Lists the Network Connectivity Center spokes associated with a specified hub and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listRoutes(ListRoutesRequest request) Lists routes in a given route table.listRoutes(RouteTableName parent) Lists routes in a given route table.listRoutes(String parent) Lists routes in a given route table.Lists routes in a given route table.Lists routes in a given route table.listRouteTables(HubName parent) Lists route tables in a given hub.listRouteTables(ListRouteTablesRequest request) Lists route tables in a given hub.listRouteTables(String parent) Lists route tables in a given hub.Lists route tables in a given hub.Lists route tables in a given hub.listSpokes(ListSpokesRequest request) Lists the Network Connectivity Center spokes in a specified project and location.listSpokes(LocationName parent) Lists the Network Connectivity Center spokes in a specified project and location.listSpokes(String parent) Lists the Network Connectivity Center spokes in a specified project and location.Lists the Network Connectivity Center spokes in a specified project and location.Lists the Network Connectivity Center spokes in a specified project and location.queryHubStatus(HubName name) Query the Private Service Connect propagation status of a Network Connectivity Center hub.queryHubStatus(QueryHubStatusRequest request) Query the Private Service Connect propagation status of a Network Connectivity Center hub.queryHubStatus(String name) Query the Private Service Connect propagation status of a Network Connectivity Center hub.Query the Private Service Connect propagation status of a Network Connectivity Center hub.Query the Private Service Connect propagation status of a Network Connectivity Center hub.rejectHubSpokeAsync(HubName name, SpokeName spokeUri) Rejects a Network Connectivity Center spoke from being attached to a hub.rejectHubSpokeAsync(HubName name, String spokeUri) Rejects a Network Connectivity Center spoke from being attached to a hub.rejectHubSpokeAsync(RejectHubSpokeRequest request) Rejects a Network Connectivity Center spoke from being attached to a hub.rejectHubSpokeAsync(String name, SpokeName spokeUri) Rejects a Network Connectivity Center spoke from being attached to a hub.rejectHubSpokeAsync(String name, String spokeUri) Rejects a Network Connectivity Center spoke from being attached to a hub.Rejects a Network Connectivity Center spoke from being attached to a hub.Rejects a Network Connectivity Center spoke from being attached to a hub.rejectSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.rejectSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Rejects a proposal to update a Network Connectivity Center spoke in a hub.rejectSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.rejectSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Rejects a proposal to update a Network Connectivity Center spoke in a hub.Rejects a proposal to update a Network Connectivity Center spoke in a hub.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateGroupAsync(Group group, com.google.protobuf.FieldMask updateMask) Updates the parameters of a Network Connectivity Center group.updateGroupAsync(UpdateGroupRequest request) Updates the parameters of a Network Connectivity Center group.Updates the parameters of a Network Connectivity Center group.Updates the parameters of a Network Connectivity Center group.final OperationFuture<Hub,OperationMetadata> updateHubAsync(Hub hub, com.google.protobuf.FieldMask updateMask) Updates the description and/or labels of a Network Connectivity Center hub.final OperationFuture<Hub,OperationMetadata> updateHubAsync(UpdateHubRequest request) Updates the description and/or labels of a Network Connectivity Center hub.Updates the description and/or labels of a Network Connectivity Center hub.Updates the description and/or labels of a Network Connectivity Center hub.updateSpokeAsync(Spoke spoke, com.google.protobuf.FieldMask updateMask) Updates the parameters of a Network Connectivity Center spoke.updateSpokeAsync(UpdateSpokeRequest request) Updates the parameters of a Network Connectivity Center spoke.Updates the parameters of a Network Connectivity Center spoke.Updates the parameters of a Network Connectivity Center spoke.
-
Constructor Details
-
HubServiceClient
Constructs an instance of HubServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
HubServiceClient
-
-
Method Details
-
create
Constructs an instance of HubServiceClient with default settings.- Throws:
IOException
-
create
Constructs an instance of HubServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of HubServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(HubServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listHubs
Lists the Network Connectivity Center hubs associated with a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listHubs
Lists the Network Connectivity Center hubs associated with a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listHubs
Lists the Network Connectivity Center hubs associated with a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listHubsPagedCallable
public final UnaryCallable<ListHubsRequest,HubServiceClient.ListHubsPagedResponse> listHubsPagedCallable()Lists the Network Connectivity Center hubs associated with a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } } -
listHubsCallable
Lists the Network Connectivity Center hubs associated with a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } } -
getHub
Gets details about a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the hub resource to get.- Throws:
ApiException- if the remote call fails
-
getHub
Gets details about a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the hub resource to get.- Throws:
ApiException- if the remote call fails
-
getHub
Gets details about a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getHubCallable
Gets details about a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createHubAsync
public final OperationFuture<Hub,OperationMetadata> createHubAsync(LocationName parent, Hub hub, String hubId) Creates a new Network Connectivity Center hub in the specified project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. The parent resource.hub- Required. The initial values for a new hub.hubId- Required. A unique identifier for the hub.- Throws:
ApiException- if the remote call fails
-
createHubAsync
public final OperationFuture<Hub,OperationMetadata> createHubAsync(String parent, Hub hub, String hubId) Creates a new Network Connectivity Center hub in the specified project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. The parent resource.hub- Required. The initial values for a new hub.hubId- Required. A unique identifier for the hub.- Throws:
ApiException- if the remote call fails
-
createHubAsync
Creates a new Network Connectivity Center hub in the specified project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createHubOperationCallable
Creates a new Network Connectivity Center hub in the specified project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createHubCallable
Creates a new Network Connectivity Center hub in the specified project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateHubAsync
public final OperationFuture<Hub,OperationMetadata> updateHubAsync(Hub hub, com.google.protobuf.FieldMask updateMask) Updates the description and/or labels of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateHubAsync
Updates the description and/or labels of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateHubOperationCallable
Updates the description and/or labels of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateHubCallable
Updates the description and/or labels of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteHubAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(HubName name) Deletes a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. The name of the hub to delete.- Throws:
ApiException- if the remote call fails
-
deleteHubAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(String name) Deletes a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. The name of the hub to delete.- Throws:
ApiException- if the remote call fails
-
deleteHubAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHubAsync(DeleteHubRequest request) Deletes a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteHubOperationCallable
public final OperationCallable<DeleteHubRequest,com.google.protobuf.Empty, deleteHubOperationCallable()OperationMetadata> Deletes a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteHubCallable
Deletes a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
name- Required. The name of the hub.- Throws:
ApiException- if the remote call fails
-
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
name- Required. The name of the hub.- Throws:
ApiException- if the remote call fails
-
listHubSpokes
public final HubServiceClient.ListHubSpokesPagedResponse listHubSpokes(ListHubSpokesRequest request) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listHubSpokesPagedCallable
public final UnaryCallable<ListHubSpokesRequest,HubServiceClient.ListHubSpokesPagedResponse> listHubSpokesPagedCallable()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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } } -
listHubSpokesCallable
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } } -
queryHubStatus
Query the Private Service Connect propagation status of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) { // doThingsWith(element); } }- Parameters:
name- Required. The name of the hub.- Throws:
ApiException- if the remote call fails
-
queryHubStatus
Query the Private Service Connect propagation status of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) { // doThingsWith(element); } }- Parameters:
name- Required. The name of the hub.- Throws:
ApiException- if the remote call fails
-
queryHubStatus
public final HubServiceClient.QueryHubStatusPagedResponse queryHubStatus(QueryHubStatusRequest request) Query the Private Service Connect propagation status of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { QueryHubStatusRequest request = QueryHubStatusRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setGroupBy("groupBy293428022") .build(); for (HubStatusEntry element : hubServiceClient.queryHubStatus(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
queryHubStatusPagedCallable
public final UnaryCallable<QueryHubStatusRequest,HubServiceClient.QueryHubStatusPagedResponse> queryHubStatusPagedCallable()Query the Private Service Connect propagation status of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { QueryHubStatusRequest request = QueryHubStatusRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setGroupBy("groupBy293428022") .build(); ApiFuture<HubStatusEntry> future = hubServiceClient.queryHubStatusPagedCallable().futureCall(request); // Do something. for (HubStatusEntry element : future.get().iterateAll()) { // doThingsWith(element); } } -
queryHubStatusCallable
Query the Private Service Connect propagation status of a Network Connectivity Center hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { QueryHubStatusRequest request = QueryHubStatusRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .setGroupBy("groupBy293428022") .build(); while (true) { QueryHubStatusResponse response = hubServiceClient.queryHubStatusCallable().call(request); for (HubStatusEntry element : response.getHubStatusEntriesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listSpokes
Lists the Network Connectivity Center spokes in a specified project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource.- Throws:
ApiException- if the remote call fails
-
listSpokes
Lists the Network Connectivity Center spokes in a specified project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource.- Throws:
ApiException- if the remote call fails
-
listSpokes
Lists the Network Connectivity Center spokes in a specified project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSpokesPagedCallable
public final UnaryCallable<ListSpokesRequest,HubServiceClient.ListSpokesPagedResponse> listSpokesPagedCallable()Lists the Network Connectivity Center spokes in a specified project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listSpokesCallable
Lists the Network Connectivity Center spokes in a specified project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getSpoke
Gets details about a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the spoke resource.- Throws:
ApiException- if the remote call fails
-
getSpoke
Gets details about a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the spoke resource.- Throws:
ApiException- if the remote call fails
-
getSpoke
Gets details about a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSpokeCallable
Gets details about a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createSpokeAsync
public final OperationFuture<Spoke,OperationMetadata> createSpokeAsync(LocationName parent, Spoke spoke, String spokeId) Creates a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. The parent resource.spoke- Required. The initial values for a new spoke.spokeId- Required. Unique id for the spoke to create.- Throws:
ApiException- if the remote call fails
-
createSpokeAsync
public final OperationFuture<Spoke,OperationMetadata> createSpokeAsync(String parent, Spoke spoke, String spokeId) Creates a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
parent- Required. The parent resource.spoke- Required. The initial values for a new spoke.spokeId- Required. Unique id for the spoke to create.- Throws:
ApiException- if the remote call fails
-
createSpokeAsync
Creates a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSpokeOperationCallable
public final OperationCallable<CreateSpokeRequest,Spoke, createSpokeOperationCallable()OperationMetadata> Creates a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
createSpokeCallable
Creates a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateSpokeAsync
public final OperationFuture<Spoke,OperationMetadata> updateSpokeAsync(Spoke spoke, com.google.protobuf.FieldMask updateMask) Updates the parameters of a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
updateSpokeAsync
Updates the parameters of a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSpokeOperationCallable
public final OperationCallable<UpdateSpokeRequest,Spoke, updateSpokeOperationCallable()OperationMetadata> Updates the parameters of a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
updateSpokeCallable
Updates the parameters of a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
rejectHubSpokeAsync
public final OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(HubName name, SpokeName spokeUri) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
rejectHubSpokeAsync
public final OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(HubName name, String spokeUri) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
rejectHubSpokeAsync
public final OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(String name, SpokeName spokeUri) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
rejectHubSpokeAsync
public final OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(String name, String spokeUri) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
rejectHubSpokeAsync
public final OperationFuture<RejectHubSpokeResponse,OperationMetadata> rejectHubSpokeAsync(RejectHubSpokeRequest request) 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
rejectHubSpokeOperationCallable
public final OperationCallable<RejectHubSpokeRequest,RejectHubSpokeResponse, rejectHubSpokeOperationCallable()OperationMetadata> 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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
rejectHubSpokeCallable
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.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
acceptHubSpokeAsync
public final OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(HubName name, SpokeName spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
acceptHubSpokeAsync
public final OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(HubName name, String spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
acceptHubSpokeAsync
public final OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(String name, SpokeName spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
acceptHubSpokeAsync
public final OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(String name, String spokeUri) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
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.- Throws:
ApiException- if the remote call fails
-
acceptHubSpokeAsync
public final OperationFuture<AcceptHubSpokeResponse,OperationMetadata> acceptHubSpokeAsync(AcceptHubSpokeRequest request) Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
acceptHubSpokeOperationCallable
public final OperationCallable<AcceptHubSpokeRequest,AcceptHubSpokeResponse, acceptHubSpokeOperationCallable()OperationMetadata> Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
acceptHubSpokeCallable
Accepts a proposal to attach a Network Connectivity Center spoke to a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
acceptSpokeUpdateAsync
public final OperationFuture<AcceptSpokeUpdateResponse,OperationMetadata> acceptSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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]"); String spokeEtag = "spokeEtag-1185145407"; AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to accept spoke update.spokeUri- Required. The URI of the spoke to accept update.spokeEtag- Required. The etag of the spoke to accept update.- Throws:
ApiException- if the remote call fails
-
acceptSpokeUpdateAsync
public final OperationFuture<AcceptSpokeUpdateResponse,OperationMetadata> acceptSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); String spokeEtag = "spokeEtag-1185145407"; AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to accept spoke update.spokeUri- Required. The URI of the spoke to accept update.spokeEtag- Required. The etag of the spoke to accept update.- Throws:
ApiException- if the remote call fails
-
acceptSpokeUpdateAsync
public final OperationFuture<AcceptSpokeUpdateResponse,OperationMetadata> acceptSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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]"); String spokeEtag = "spokeEtag-1185145407"; AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to accept spoke update.spokeUri- Required. The URI of the spoke to accept update.spokeEtag- Required. The etag of the spoke to accept update.- Throws:
ApiException- if the remote call fails
-
acceptSpokeUpdateAsync
public final OperationFuture<AcceptSpokeUpdateResponse,OperationMetadata> acceptSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); String spokeEtag = "spokeEtag-1185145407"; AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to accept spoke update.spokeUri- Required. The URI of the spoke to accept update.spokeEtag- Required. The etag of the spoke to accept update.- Throws:
ApiException- if the remote call fails
-
acceptSpokeUpdateAsync
public final OperationFuture<AcceptSpokeUpdateResponse,OperationMetadata> acceptSpokeUpdateAsync(AcceptSpokeUpdateRequest request) Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { AcceptSpokeUpdateRequest request = AcceptSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setRequestId("requestId693933066") .build(); AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
acceptSpokeUpdateOperationCallable
public final OperationCallable<AcceptSpokeUpdateRequest,AcceptSpokeUpdateResponse, acceptSpokeUpdateOperationCallable()OperationMetadata> Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { AcceptSpokeUpdateRequest request = AcceptSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setRequestId("requestId693933066") .build(); OperationFuture<AcceptSpokeUpdateResponse, OperationMetadata> future = hubServiceClient.acceptSpokeUpdateOperationCallable().futureCall(request); // Do something. AcceptSpokeUpdateResponse response = future.get(); } -
acceptSpokeUpdateCallable
Accepts a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { AcceptSpokeUpdateRequest request = AcceptSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = hubServiceClient.acceptSpokeUpdateCallable().futureCall(request); // Do something. Operation response = future.get(); } -
rejectSpokeUpdateAsync
public final OperationFuture<RejectSpokeUpdateResponse,OperationMetadata> rejectSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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]"); String spokeEtag = "spokeEtag-1185145407"; RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to reject spoke update.spokeUri- Required. The URI of the spoke to reject update.spokeEtag- Required. The etag of the spoke to reject update.- Throws:
ApiException- if the remote call fails
-
rejectSpokeUpdateAsync
public final OperationFuture<RejectSpokeUpdateResponse,OperationMetadata> rejectSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); String spokeEtag = "spokeEtag-1185145407"; RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to reject spoke update.spokeUri- Required. The URI of the spoke to reject update.spokeEtag- Required. The etag of the spoke to reject update.- Throws:
ApiException- if the remote call fails
-
rejectSpokeUpdateAsync
public final OperationFuture<RejectSpokeUpdateResponse,OperationMetadata> rejectSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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]"); String spokeEtag = "spokeEtag-1185145407"; RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to reject spoke update.spokeUri- Required. The URI of the spoke to reject update.spokeEtag- Required. The etag of the spoke to reject update.- Throws:
ApiException- if the remote call fails
-
rejectSpokeUpdateAsync
public final OperationFuture<RejectSpokeUpdateResponse,OperationMetadata> rejectSpokeUpdateAsync(String name, String spokeUri, String spokeEtag) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); String spokeEtag = "spokeEtag-1185145407"; RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get(); }- Parameters:
name- Required. The name of the hub to reject spoke update.spokeUri- Required. The URI of the spoke to reject update.spokeEtag- Required. The etag of the spoke to reject update.- Throws:
ApiException- if the remote call fails
-
rejectSpokeUpdateAsync
public final OperationFuture<RejectSpokeUpdateResponse,OperationMetadata> rejectSpokeUpdateAsync(RejectSpokeUpdateRequest request) Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RejectSpokeUpdateRequest request = RejectSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setDetails("details1557721666") .setRequestId("requestId693933066") .build(); RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
rejectSpokeUpdateOperationCallable
public final OperationCallable<RejectSpokeUpdateRequest,RejectSpokeUpdateResponse, rejectSpokeUpdateOperationCallable()OperationMetadata> Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RejectSpokeUpdateRequest request = RejectSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setDetails("details1557721666") .setRequestId("requestId693933066") .build(); OperationFuture<RejectSpokeUpdateResponse, OperationMetadata> future = hubServiceClient.rejectSpokeUpdateOperationCallable().futureCall(request); // Do something. RejectSpokeUpdateResponse response = future.get(); } -
rejectSpokeUpdateCallable
Rejects a proposal to update a Network Connectivity Center spoke in a hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RejectSpokeUpdateRequest request = RejectSpokeUpdateRequest.newBuilder() .setName(HubName.of("[PROJECT]", "[HUB]").toString()) .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString()) .setSpokeEtag("spokeEtag-1185145407") .setDetails("details1557721666") .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = hubServiceClient.rejectSpokeUpdateCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteSpokeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(SpokeName name) Deletes a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. The name of the spoke to delete.- Throws:
ApiException- if the remote call fails
-
deleteSpokeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(String name) Deletes a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
name- Required. The name of the spoke to delete.- Throws:
ApiException- if the remote call fails
-
deleteSpokeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSpokeAsync(DeleteSpokeRequest request) Deletes a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSpokeOperationCallable
public final OperationCallable<DeleteSpokeRequest,com.google.protobuf.Empty, deleteSpokeOperationCallable()OperationMetadata> Deletes a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
deleteSpokeCallable
Deletes a Network Connectivity Center spoke.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
getRouteTable
Gets details about a Network Connectivity Center route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the route table resource.- Throws:
ApiException- if the remote call fails
-
getRouteTable
Gets details about a Network Connectivity Center route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the route table resource.- Throws:
ApiException- if the remote call fails
-
getRouteTable
Gets details about a Network Connectivity Center route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRouteTableCallable
Gets details about a Network Connectivity Center route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
getRoute
Gets details about the specified route.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the route resource.- Throws:
ApiException- if the remote call fails
-
getRoute
Gets details about the specified route.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
name- Required. The name of the route resource.- Throws:
ApiException- if the remote call fails
-
getRoute
Gets details about the specified route.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRouteCallable
Gets details about the specified route.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
listRoutes
Lists routes in a given route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listRoutes
Lists routes in a given route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listRoutes
Lists routes in a given route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listRoutesPagedCallable
public final UnaryCallable<ListRoutesRequest,HubServiceClient.ListRoutesPagedResponse> listRoutesPagedCallable()Lists routes in a given route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } } -
listRoutesCallable
Lists routes in a given route table.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } } -
listRouteTables
Lists route tables in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listRouteTables
Lists route tables in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listRouteTables
public final HubServiceClient.ListRouteTablesPagedResponse listRouteTables(ListRouteTablesRequest request) Lists route tables in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listRouteTablesPagedCallable
public final UnaryCallable<ListRouteTablesRequest,HubServiceClient.ListRouteTablesPagedResponse> listRouteTablesPagedCallable()Lists route tables in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } } -
listRouteTablesCallable
public final UnaryCallable<ListRouteTablesRequest,ListRouteTablesResponse> listRouteTablesCallable()Lists route tables in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } } -
getGroup
Gets details about a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]"); Group response = hubServiceClient.getGroup(name); }- Parameters:
name- Required. The name of the route table resource.- Throws:
ApiException- if the remote call fails
-
getGroup
Gets details about a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString(); Group response = hubServiceClient.getGroup(name); }- Parameters:
name- Required. The name of the route table resource.- Throws:
ApiException- if the remote call fails
-
getGroup
Gets details about a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { GetGroupRequest request = GetGroupRequest.newBuilder() .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString()) .build(); Group response = hubServiceClient.getGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getGroupCallable
Gets details about a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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(); } -
listGroups
Lists groups in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listGroups
Lists groups in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
parent- Required. The parent resource's name.- Throws:
ApiException- if the remote call fails
-
listGroups
Lists groups in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listGroupsPagedCallable
public final UnaryCallable<ListGroupsRequest,HubServiceClient.ListGroupsPagedResponse> listGroupsPagedCallable()Lists groups in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); } } -
listGroupsCallable
Lists groups in a given hub.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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; } } } -
updateGroupAsync
public final OperationFuture<Group,OperationMetadata> updateGroupAsync(Group group, com.google.protobuf.FieldMask updateMask) Updates the parameters of a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { Group group = Group.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Group response = hubServiceClient.updateGroupAsync(group, updateMask).get(); }- Parameters:
group- Required. The state that the group should be in after the update.updateMask- Optional. In the case of an update to an existing group, 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.- Throws:
ApiException- if the remote call fails
-
updateGroupAsync
Updates the parameters of a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); Group response = hubServiceClient.updateGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateGroupOperationCallable
public final OperationCallable<UpdateGroupRequest,Group, updateGroupOperationCallable()OperationMetadata> Updates the parameters of a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Group, OperationMetadata> future = hubServiceClient.updateGroupOperationCallable().futureCall(request); // Do something. Group response = future.get(); } -
updateGroupCallable
Updates the parameters of a Network Connectivity Center group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGroup(Group.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = hubServiceClient.updateGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listLocations
public final HubServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,HubServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (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; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = hubServiceClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (HubServiceClient hubServiceClient = HubServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = hubServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.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(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-