Class EdgeNetworkClient
- 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) {
ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]");
InitializeZoneResponse response = edgeNetworkClient.initializeZone(name);
}
Note: close() needs to be called on the EdgeNetworkClient 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 |
|---|---|---|
InitializeZone |
InitializeZone will initialize resources for a zone in a 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.
|
ListZones |
Deprecated: not implemented. Lists Zones in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetZone |
Deprecated: not implemented. Gets details of a single Zone. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListNetworks |
Lists Networks in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetNetwork |
Gets details of a single Network. |
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.
|
DiagnoseNetwork |
Get the diagnostics of a single network resource. |
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.
|
CreateNetwork |
Creates a new Network in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteNetwork |
Deletes a single Network. |
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.
|
ListSubnets |
Lists Subnets in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSubnet |
Gets details of a single Subnet. |
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.
|
CreateSubnet |
Creates a new Subnet in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSubnet |
Updates the parameters of a single Subnet. |
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.
|
DeleteSubnet |
Deletes a single Subnet. |
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.
|
ListInterconnects |
Lists Interconnects in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetInterconnect |
Gets details of a single Interconnect. |
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.
|
DiagnoseInterconnect |
Get the diagnostics of a single interconnect resource. |
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.
|
ListInterconnectAttachments |
Lists InterconnectAttachments in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetInterconnectAttachment |
Gets details of a single InterconnectAttachment. |
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.
|
CreateInterconnectAttachment |
Creates a new InterconnectAttachment in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteInterconnectAttachment |
Deletes a single InterconnectAttachment. |
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.
|
ListRouters |
Lists Routers in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRouter |
Gets details of a single Router. |
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.
|
DiagnoseRouter |
Get the diagnostics of a single router resource. |
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.
|
CreateRouter |
Creates a new Router in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateRouter |
Updates the parameters of a single Router. |
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.
|
DeleteRouter |
Deletes a single Router. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of EdgeNetworkSettings 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
EdgeNetworkSettings edgeNetworkSettings =
EdgeNetworkSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
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
EdgeNetworkSettings edgeNetworkSettings =
EdgeNetworkSettings.newBuilder().setEndpoint(myEndpoint).build();
EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
EdgeNetworkSettings edgeNetworkSettings = EdgeNetworkSettings.newHttpJsonBuilder().build();
EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create(edgeNetworkSettings);
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 class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEdgeNetworkClient(EdgeNetworkSettings settings) Constructs an instance of EdgeNetworkClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final EdgeNetworkClientcreate()Constructs an instance of EdgeNetworkClient with default settings.static final EdgeNetworkClientcreate(EdgeNetworkSettings settings) Constructs an instance of EdgeNetworkClient, using the given settings.static final EdgeNetworkClientcreate(EdgeNetworkStub stub) Constructs an instance of EdgeNetworkClient, using the given stub for making calls.Creates a new InterconnectAttachment in a given project and location.createInterconnectAttachmentAsync(ZoneName parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId) Creates a new InterconnectAttachment in a given project and location.createInterconnectAttachmentAsync(String parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId) Creates a new InterconnectAttachment in a given project and location.Creates a new InterconnectAttachment in a given project and location.final OperationCallable<CreateInterconnectAttachmentRequest,InterconnectAttachment, OperationMetadata> Creates a new InterconnectAttachment in a given project and location.createNetworkAsync(CreateNetworkRequest request) Creates a new Network in a given project and location.createNetworkAsync(ZoneName parent, Network network, String networkId) Creates a new Network in a given project and location.createNetworkAsync(String parent, Network network, String networkId) Creates a new Network in a given project and location.Creates a new Network in a given project and location.Creates a new Network in a given project and location.createRouterAsync(CreateRouterRequest request) Creates a new Router in a given project and location.createRouterAsync(ZoneName parent, Router router, String routerId) Creates a new Router in a given project and location.createRouterAsync(String parent, Router router, String routerId) Creates a new Router in a given project and location.Creates a new Router in a given project and location.Creates a new Router in a given project and location.createSubnetAsync(CreateSubnetRequest request) Creates a new Subnet in a given project and location.createSubnetAsync(ZoneName parent, Subnet subnet, String subnetId) Creates a new Subnet in a given project and location.createSubnetAsync(String parent, Subnet subnet, String subnetId) Creates a new Subnet in a given project and location.Creates a new Subnet in a given project and location.Creates a new Subnet in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single InterconnectAttachment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single InterconnectAttachment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single InterconnectAttachment.Deletes a single InterconnectAttachment.final OperationCallable<DeleteInterconnectAttachmentRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single InterconnectAttachment.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNetworkAsync(DeleteNetworkRequest request) Deletes a single Network.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Network.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNetworkAsync(String name) Deletes a single Network.Deletes a single Network.final OperationCallable<DeleteNetworkRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Network.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(DeleteRouterRequest request) Deletes a single Router.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(RouterName name) Deletes a single Router.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(String name) Deletes a single Router.Deletes a single Router.final OperationCallable<DeleteRouterRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Router.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(DeleteSubnetRequest request) Deletes a single Subnet.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(SubnetName name) Deletes a single Subnet.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(String name) Deletes a single Subnet.Deletes a single Subnet.final OperationCallable<DeleteSubnetRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Subnet.Get the diagnostics of a single interconnect resource.Get the diagnostics of a single interconnect resource.diagnoseInterconnect(String name) Get the diagnostics of a single interconnect resource.Get the diagnostics of a single interconnect resource.final DiagnoseNetworkResponsediagnoseNetwork(DiagnoseNetworkRequest request) Get the diagnostics of a single network resource.final DiagnoseNetworkResponsediagnoseNetwork(NetworkName name) Get the diagnostics of a single network resource.final DiagnoseNetworkResponsediagnoseNetwork(String name) Get the diagnostics of a single network resource.Get the diagnostics of a single network resource.final DiagnoseRouterResponsediagnoseRouter(DiagnoseRouterRequest request) Get the diagnostics of a single router resource.final DiagnoseRouterResponsediagnoseRouter(RouterName name) Get the diagnostics of a single router resource.final DiagnoseRouterResponsediagnoseRouter(String name) Get the diagnostics of a single router resource.Get the diagnostics of a single router resource.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final InterconnectgetInterconnect(GetInterconnectRequest request) Gets details of a single Interconnect.final InterconnectGets details of a single Interconnect.final InterconnectgetInterconnect(String name) Gets details of a single Interconnect.final InterconnectAttachmentGets details of a single InterconnectAttachment.final InterconnectAttachmentGets details of a single InterconnectAttachment.final InterconnectAttachmentGets details of a single InterconnectAttachment.Gets details of a single InterconnectAttachment.Gets details of a single Interconnect.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final NetworkgetNetwork(GetNetworkRequest request) Gets details of a single Network.final NetworkgetNetwork(NetworkName name) Gets details of a single Network.final NetworkgetNetwork(String name) Gets details of a single Network.Gets details of a single Network.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final RoutergetRouter(GetRouterRequest request) Gets details of a single Router.final RoutergetRouter(RouterName name) Gets details of a single Router.final RouterGets details of a single Router.final UnaryCallable<GetRouterRequest,Router> Gets details of a single Router.final EdgeNetworkSettingsgetStub()final SubnetgetSubnet(GetSubnetRequest request) Gets details of a single Subnet.final SubnetgetSubnet(SubnetName name) Gets details of a single Subnet.final SubnetGets details of a single Subnet.final UnaryCallable<GetSubnetRequest,Subnet> Gets details of a single Subnet.final ZonegetZone(GetZoneRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.final ZoneDeprecated.This method is deprecated and will be removed in the next major version update.final ZoneDeprecated.This method is deprecated and will be removed in the next major version update.final UnaryCallable<GetZoneRequest,Zone> Deprecated.This method is deprecated and will be removed in the next major version update.final InitializeZoneResponseinitializeZone(InitializeZoneRequest request) InitializeZone will initialize resources for a zone in a project.final InitializeZoneResponseinitializeZone(ZoneName name) InitializeZone will initialize resources for a zone in a project.final InitializeZoneResponseinitializeZone(String name) InitializeZone will initialize resources for a zone in a project.InitializeZone will initialize resources for a zone in a project.booleanbooleanLists InterconnectAttachments in a given project and location.listInterconnectAttachments(ZoneName parent) Lists InterconnectAttachments in a given project and location.listInterconnectAttachments(String parent) Lists InterconnectAttachments in a given project and location.Lists InterconnectAttachments in a given project and location.final UnaryCallable<ListInterconnectAttachmentsRequest,EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse> Lists InterconnectAttachments in a given project and location.Lists Interconnects in a given project and location.listInterconnects(ZoneName parent) Lists Interconnects in a given project and location.listInterconnects(String parent) Lists Interconnects in a given project and location.Lists Interconnects in a given project and location.Lists Interconnects in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listNetworks(ListNetworksRequest request) Lists Networks in a given project and location.listNetworks(ZoneName parent) Lists Networks in a given project and location.listNetworks(String parent) Lists Networks in a given project and location.Lists Networks in a given project and location.Lists Networks in a given project and location.listRouters(ListRoutersRequest request) Lists Routers in a given project and location.listRouters(ZoneName parent) Lists Routers in a given project and location.listRouters(String parent) Lists Routers in a given project and location.Lists Routers in a given project and location.Lists Routers in a given project and location.listSubnets(ListSubnetsRequest request) Lists Subnets in a given project and location.listSubnets(ZoneName parent) Lists Subnets in a given project and location.listSubnets(String parent) Lists Subnets in a given project and location.Lists Subnets in a given project and location.Lists Subnets in a given project and location.listZones(ListZonesRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.listZones(LocationName parent) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated.This method is deprecated and will be removed in the next major version update.voidshutdown()voidupdateRouterAsync(Router router, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Router.updateRouterAsync(UpdateRouterRequest request) Updates the parameters of a single Router.Updates the parameters of a single Router.Updates the parameters of a single Router.updateSubnetAsync(Subnet subnet, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Subnet.updateSubnetAsync(UpdateSubnetRequest request) Updates the parameters of a single Subnet.Updates the parameters of a single Subnet.Updates the parameters of a single Subnet.
-
Constructor Details
-
EdgeNetworkClient
Constructs an instance of EdgeNetworkClient, 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
-
EdgeNetworkClient
-
-
Method Details
-
create
Constructs an instance of EdgeNetworkClient with default settings.- Throws:
IOException
-
create
Constructs an instance of EdgeNetworkClient, 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 EdgeNetworkClient, using the given stub for making calls. This is for advanced usage - prefer using create(EdgeNetworkSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
initializeZone
InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); InitializeZoneResponse response = edgeNetworkClient.initializeZone(name); }- Parameters:
name- Required. The name of the zone resource.- Throws:
ApiException- if the remote call fails
-
initializeZone
InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); InitializeZoneResponse response = edgeNetworkClient.initializeZone(name); }- Parameters:
name- Required. The name of the zone resource.- Throws:
ApiException- if the remote call fails
-
initializeZone
InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InitializeZoneRequest request = InitializeZoneRequest.newBuilder() .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .build(); InitializeZoneResponse response = edgeNetworkClient.initializeZone(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
initializeZoneCallable
InitializeZone will initialize resources for a zone in a 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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InitializeZoneRequest request = InitializeZoneRequest.newBuilder() .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .build(); ApiFuture<InitializeZoneResponse> future = edgeNetworkClient.initializeZoneCallable().futureCall(request); // Do something. InitializeZoneResponse response = future.get(); } -
listZones
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Lists Zones in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListZonesRequest- Throws:
ApiException- if the remote call fails
-
listZones
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Lists Zones in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Zone element : edgeNetworkClient.listZones(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListZonesRequest- Throws:
ApiException- if the remote call fails
-
listZones
@Deprecated public final EdgeNetworkClient.ListZonesPagedResponse listZones(ListZonesRequest request) Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Lists Zones in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListZonesRequest request = ListZonesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Zone element : edgeNetworkClient.listZones(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listZonesPagedCallable
@Deprecated public final UnaryCallable<ListZonesRequest,EdgeNetworkClient.ListZonesPagedResponse> listZonesPagedCallable()Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Lists Zones in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListZonesRequest request = ListZonesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Zone> future = edgeNetworkClient.listZonesPagedCallable().futureCall(request); // Do something. for (Zone element : future.get().iterateAll()) { // doThingsWith(element); } } -
listZonesCallable
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Lists Zones in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListZonesRequest request = ListZonesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListZonesResponse response = edgeNetworkClient.listZonesCallable().call(request); for (Zone element : response.getZonesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getZone
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Gets details of a single Zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); Zone response = edgeNetworkClient.getZone(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getZone
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Gets details of a single Zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); Zone response = edgeNetworkClient.getZone(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getZone
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Gets details of a single Zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetZoneRequest request = GetZoneRequest.newBuilder() .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .build(); Zone response = edgeNetworkClient.getZone(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getZoneCallable
Deprecated.This method is deprecated and will be removed in the next major version update.Deprecated: not implemented. Gets details of a single Zone.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetZoneRequest request = GetZoneRequest.newBuilder() .setName(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .build(); ApiFuture<Zone> future = edgeNetworkClient.getZoneCallable().futureCall(request); // Do something. Zone response = future.get(); } -
listNetworks
Lists Networks in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListNetworksRequest- Throws:
ApiException- if the remote call fails
-
listNetworks
Lists Networks in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); for (Network element : edgeNetworkClient.listNetworks(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListNetworksRequest- Throws:
ApiException- if the remote call fails
-
listNetworks
Lists Networks in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListNetworksRequest request = ListNetworksRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Network element : edgeNetworkClient.listNetworks(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
-
listNetworksPagedCallable
public final UnaryCallable<ListNetworksRequest,EdgeNetworkClient.ListNetworksPagedResponse> listNetworksPagedCallable()Lists Networks in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListNetworksRequest request = ListNetworksRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Network> future = edgeNetworkClient.listNetworksPagedCallable().futureCall(request); // Do something. for (Network element : future.get().iterateAll()) { // doThingsWith(element); } } -
listNetworksCallable
Lists Networks in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListNetworksRequest request = ListNetworksRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListNetworksResponse response = edgeNetworkClient.listNetworksCallable().call(request); for (Network element : response.getNetworksList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getNetwork
Gets details of a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); Network response = edgeNetworkClient.getNetwork(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getNetwork
Gets details of a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); Network response = edgeNetworkClient.getNetwork(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getNetwork
Gets details of a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetNetworkRequest request = GetNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .build(); Network response = edgeNetworkClient.getNetwork(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getNetworkCallable
Gets details of a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetNetworkRequest request = GetNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .build(); ApiFuture<Network> future = edgeNetworkClient.getNetworkCallable().futureCall(request); // Do something. Network response = future.get(); } -
diagnoseNetwork
Get the diagnostics of a single network resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name); }- Parameters:
name- Required. The name of the network resource.- Throws:
ApiException- if the remote call fails
-
diagnoseNetwork
Get the diagnostics of a single network resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(name); }- Parameters:
name- Required. The name of the network resource.- Throws:
ApiException- if the remote call fails
-
diagnoseNetwork
Get the diagnostics of a single network resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseNetworkRequest request = DiagnoseNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .build(); DiagnoseNetworkResponse response = edgeNetworkClient.diagnoseNetwork(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
diagnoseNetworkCallable
public final UnaryCallable<DiagnoseNetworkRequest,DiagnoseNetworkResponse> diagnoseNetworkCallable()Get the diagnostics of a single network resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseNetworkRequest request = DiagnoseNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .build(); ApiFuture<DiagnoseNetworkResponse> future = edgeNetworkClient.diagnoseNetworkCallable().futureCall(request); // Do something. DiagnoseNetworkResponse response = future.get(); } -
createNetworkAsync
public final OperationFuture<Network,OperationMetadata> createNetworkAsync(ZoneName parent, Network network, String networkId) Creates a new Network in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); Network network = Network.newBuilder().build(); String networkId = "networkId2062782441"; Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get(); }- Parameters:
parent- Required. Value for parent.network- Required. The resource being creatednetworkId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and network_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createNetworkAsync
public final OperationFuture<Network,OperationMetadata> createNetworkAsync(String parent, Network network, String networkId) Creates a new Network in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); Network network = Network.newBuilder().build(); String networkId = "networkId2062782441"; Network response = edgeNetworkClient.createNetworkAsync(parent, network, networkId).get(); }- Parameters:
parent- Required. Value for parent.network- Required. The resource being creatednetworkId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and network_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createNetworkAsync
public final OperationFuture<Network,OperationMetadata> createNetworkAsync(CreateNetworkRequest request) Creates a new Network in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateNetworkRequest request = CreateNetworkRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setNetworkId("networkId2062782441") .setNetwork(Network.newBuilder().build()) .setRequestId("requestId693933066") .build(); Network response = edgeNetworkClient.createNetworkAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createNetworkOperationCallable
public final OperationCallable<CreateNetworkRequest,Network, createNetworkOperationCallable()OperationMetadata> Creates a new Network in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateNetworkRequest request = CreateNetworkRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setNetworkId("networkId2062782441") .setNetwork(Network.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Network, OperationMetadata> future = edgeNetworkClient.createNetworkOperationCallable().futureCall(request); // Do something. Network response = future.get(); } -
createNetworkCallable
Creates a new Network in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateNetworkRequest request = CreateNetworkRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setNetworkId("networkId2062782441") .setNetwork(Network.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.createNetworkCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteNetworkAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNetworkAsync(NetworkName name) Deletes a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { NetworkName name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]"); edgeNetworkClient.deleteNetworkAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteNetworkAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNetworkAsync(String name) Deletes a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString(); edgeNetworkClient.deleteNetworkAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteNetworkAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteNetworkAsync(DeleteNetworkRequest request) Deletes a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteNetworkRequest request = DeleteNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .setRequestId("requestId693933066") .build(); edgeNetworkClient.deleteNetworkAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteNetworkOperationCallable
public final OperationCallable<DeleteNetworkRequest,com.google.protobuf.Empty, deleteNetworkOperationCallable()OperationMetadata> Deletes a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteNetworkRequest request = DeleteNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = edgeNetworkClient.deleteNetworkOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteNetworkCallable
Deletes a single Network.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteNetworkRequest request = DeleteNetworkRequest.newBuilder() .setName(NetworkName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[NETWORK]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.deleteNetworkCallable().futureCall(request); // Do something. future.get(); } -
listSubnets
Lists Subnets in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListSubnetsRequest- Throws:
ApiException- if the remote call fails
-
listSubnets
Lists Subnets in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); for (Subnet element : edgeNetworkClient.listSubnets(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListSubnetsRequest- Throws:
ApiException- if the remote call fails
-
listSubnets
Lists Subnets in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListSubnetsRequest request = ListSubnetsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Subnet element : edgeNetworkClient.listSubnets(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
-
listSubnetsPagedCallable
public final UnaryCallable<ListSubnetsRequest,EdgeNetworkClient.ListSubnetsPagedResponse> listSubnetsPagedCallable()Lists Subnets in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListSubnetsRequest request = ListSubnetsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Subnet> future = edgeNetworkClient.listSubnetsPagedCallable().futureCall(request); // Do something. for (Subnet element : future.get().iterateAll()) { // doThingsWith(element); } } -
listSubnetsCallable
Lists Subnets in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListSubnetsRequest request = ListSubnetsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListSubnetsResponse response = edgeNetworkClient.listSubnetsCallable().call(request); for (Subnet element : response.getSubnetsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getSubnet
Gets details of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); Subnet response = edgeNetworkClient.getSubnet(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getSubnet
Gets details of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString(); Subnet response = edgeNetworkClient.getSubnet(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getSubnet
Gets details of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetSubnetRequest request = GetSubnetRequest.newBuilder() .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) .build(); Subnet response = edgeNetworkClient.getSubnet(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSubnetCallable
Gets details of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetSubnetRequest request = GetSubnetRequest.newBuilder() .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) .build(); ApiFuture<Subnet> future = edgeNetworkClient.getSubnetCallable().futureCall(request); // Do something. Subnet response = future.get(); } -
createSubnetAsync
public final OperationFuture<Subnet,OperationMetadata> createSubnetAsync(ZoneName parent, Subnet subnet, String subnetId) Creates a new Subnet in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); Subnet subnet = Subnet.newBuilder().build(); String subnetId = "subnetId-2066159272"; Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get(); }- Parameters:
parent- Required. Value for parent.subnet- Required. The resource being createdsubnetId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and subnet_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createSubnetAsync
public final OperationFuture<Subnet,OperationMetadata> createSubnetAsync(String parent, Subnet subnet, String subnetId) Creates a new Subnet in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); Subnet subnet = Subnet.newBuilder().build(); String subnetId = "subnetId-2066159272"; Subnet response = edgeNetworkClient.createSubnetAsync(parent, subnet, subnetId).get(); }- Parameters:
parent- Required. Value for parent.subnet- Required. The resource being createdsubnetId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and subnet_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createSubnetAsync
public final OperationFuture<Subnet,OperationMetadata> createSubnetAsync(CreateSubnetRequest request) Creates a new Subnet in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateSubnetRequest request = CreateSubnetRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setSubnetId("subnetId-2066159272") .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); Subnet response = edgeNetworkClient.createSubnetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSubnetOperationCallable
public final OperationCallable<CreateSubnetRequest,Subnet, createSubnetOperationCallable()OperationMetadata> Creates a new Subnet in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateSubnetRequest request = CreateSubnetRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setSubnetId("subnetId-2066159272") .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Subnet, OperationMetadata> future = edgeNetworkClient.createSubnetOperationCallable().futureCall(request); // Do something. Subnet response = future.get(); } -
createSubnetCallable
Creates a new Subnet in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateSubnetRequest request = CreateSubnetRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setSubnetId("subnetId-2066159272") .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.createSubnetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateSubnetAsync
public final OperationFuture<Subnet,OperationMetadata> updateSubnetAsync(Subnet subnet, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { Subnet subnet = Subnet.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Subnet response = edgeNetworkClient.updateSubnetAsync(subnet, updateMask).get(); }- Parameters:
subnet- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Subnet resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateSubnetAsync
public final OperationFuture<Subnet,OperationMetadata> updateSubnetAsync(UpdateSubnetRequest request) Updates the parameters of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateSubnetRequest request = UpdateSubnetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); Subnet response = edgeNetworkClient.updateSubnetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSubnetOperationCallable
public final OperationCallable<UpdateSubnetRequest,Subnet, updateSubnetOperationCallable()OperationMetadata> Updates the parameters of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateSubnetRequest request = UpdateSubnetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Subnet, OperationMetadata> future = edgeNetworkClient.updateSubnetOperationCallable().futureCall(request); // Do something. Subnet response = future.get(); } -
updateSubnetCallable
Updates the parameters of a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateSubnetRequest request = UpdateSubnetRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSubnet(Subnet.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.updateSubnetCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteSubnetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(SubnetName name) Deletes a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { SubnetName name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]"); edgeNetworkClient.deleteSubnetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteSubnetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(String name) Deletes a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString(); edgeNetworkClient.deleteSubnetAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteSubnetAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubnetAsync(DeleteSubnetRequest request) Deletes a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteSubnetRequest request = DeleteSubnetRequest.newBuilder() .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) .setRequestId("requestId693933066") .build(); edgeNetworkClient.deleteSubnetAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSubnetOperationCallable
public final OperationCallable<DeleteSubnetRequest,com.google.protobuf.Empty, deleteSubnetOperationCallable()OperationMetadata> Deletes a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteSubnetRequest request = DeleteSubnetRequest.newBuilder() .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = edgeNetworkClient.deleteSubnetOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteSubnetCallable
Deletes a single Subnet.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteSubnetRequest request = DeleteSubnetRequest.newBuilder() .setName(SubnetName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[SUBNET]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.deleteSubnetCallable().futureCall(request); // Do something. future.get(); } -
listInterconnects
Lists Interconnects in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInterconnectsRequest- Throws:
ApiException- if the remote call fails
-
listInterconnects
Lists Interconnects in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); for (Interconnect element : edgeNetworkClient.listInterconnects(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInterconnectsRequest- Throws:
ApiException- if the remote call fails
-
listInterconnects
public final EdgeNetworkClient.ListInterconnectsPagedResponse listInterconnects(ListInterconnectsRequest request) Lists Interconnects in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectsRequest request = ListInterconnectsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Interconnect element : edgeNetworkClient.listInterconnects(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
-
listInterconnectsPagedCallable
public final UnaryCallable<ListInterconnectsRequest,EdgeNetworkClient.ListInterconnectsPagedResponse> listInterconnectsPagedCallable()Lists Interconnects in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectsRequest request = ListInterconnectsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Interconnect> future = edgeNetworkClient.listInterconnectsPagedCallable().futureCall(request); // Do something. for (Interconnect element : future.get().iterateAll()) { // doThingsWith(element); } } -
listInterconnectsCallable
public final UnaryCallable<ListInterconnectsRequest,ListInterconnectsResponse> listInterconnectsCallable()Lists Interconnects in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectsRequest request = ListInterconnectsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListInterconnectsResponse response = edgeNetworkClient.listInterconnectsCallable().call(request); for (Interconnect element : response.getInterconnectsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getInterconnect
Gets details of a single Interconnect.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InterconnectName name = InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); Interconnect response = edgeNetworkClient.getInterconnect(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getInterconnect
Gets details of a single Interconnect.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString(); Interconnect response = edgeNetworkClient.getInterconnect(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getInterconnect
Gets details of a single Interconnect.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetInterconnectRequest request = GetInterconnectRequest.newBuilder() .setName( InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") .toString()) .build(); Interconnect response = edgeNetworkClient.getInterconnect(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getInterconnectCallable
Gets details of a single Interconnect.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetInterconnectRequest request = GetInterconnectRequest.newBuilder() .setName( InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") .toString()) .build(); ApiFuture<Interconnect> future = edgeNetworkClient.getInterconnectCallable().futureCall(request); // Do something. Interconnect response = future.get(); } -
diagnoseInterconnect
Get the diagnostics of a single interconnect resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InterconnectName name = InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]"); DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name); }- Parameters:
name- Required. The name of the interconnect resource.- Throws:
ApiException- if the remote call fails
-
diagnoseInterconnect
Get the diagnostics of a single interconnect resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]").toString(); DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(name); }- Parameters:
name- Required. The name of the interconnect resource.- Throws:
ApiException- if the remote call fails
-
diagnoseInterconnect
Get the diagnostics of a single interconnect resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseInterconnectRequest request = DiagnoseInterconnectRequest.newBuilder() .setName( InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") .toString()) .build(); DiagnoseInterconnectResponse response = edgeNetworkClient.diagnoseInterconnect(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
diagnoseInterconnectCallable
public final UnaryCallable<DiagnoseInterconnectRequest,DiagnoseInterconnectResponse> diagnoseInterconnectCallable()Get the diagnostics of a single interconnect resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseInterconnectRequest request = DiagnoseInterconnectRequest.newBuilder() .setName( InterconnectName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT]") .toString()) .build(); ApiFuture<DiagnoseInterconnectResponse> future = edgeNetworkClient.diagnoseInterconnectCallable().futureCall(request); // Do something. DiagnoseInterconnectResponse response = future.get(); } -
listInterconnectAttachments
public final EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse listInterconnectAttachments(ZoneName parent) Lists InterconnectAttachments in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); for (InterconnectAttachment element : edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInterconnectAttachmentsRequest- Throws:
ApiException- if the remote call fails
-
listInterconnectAttachments
public final EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse listInterconnectAttachments(String parent) Lists InterconnectAttachments in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); for (InterconnectAttachment element : edgeNetworkClient.listInterconnectAttachments(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListInterconnectAttachmentsRequest- Throws:
ApiException- if the remote call fails
-
listInterconnectAttachments
public final EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse listInterconnectAttachments(ListInterconnectAttachmentsRequest request) Lists InterconnectAttachments in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectAttachmentsRequest request = ListInterconnectAttachmentsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (InterconnectAttachment element : edgeNetworkClient.listInterconnectAttachments(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
-
listInterconnectAttachmentsPagedCallable
public final UnaryCallable<ListInterconnectAttachmentsRequest,EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse> listInterconnectAttachmentsPagedCallable()Lists InterconnectAttachments in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectAttachmentsRequest request = ListInterconnectAttachmentsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<InterconnectAttachment> future = edgeNetworkClient.listInterconnectAttachmentsPagedCallable().futureCall(request); // Do something. for (InterconnectAttachment element : future.get().iterateAll()) { // doThingsWith(element); } } -
listInterconnectAttachmentsCallable
public final UnaryCallable<ListInterconnectAttachmentsRequest,ListInterconnectAttachmentsResponse> listInterconnectAttachmentsCallable()Lists InterconnectAttachments in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListInterconnectAttachmentsRequest request = ListInterconnectAttachmentsRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListInterconnectAttachmentsResponse response = edgeNetworkClient.listInterconnectAttachmentsCallable().call(request); for (InterconnectAttachment element : response.getInterconnectAttachmentsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getInterconnectAttachment
Gets details of a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InterconnectAttachmentName name = InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getInterconnectAttachment
Gets details of a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString(); InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getInterconnectAttachment
public final InterconnectAttachment getInterconnectAttachment(GetInterconnectAttachmentRequest request) Gets details of a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetInterconnectAttachmentRequest request = GetInterconnectAttachmentRequest.newBuilder() .setName( InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString()) .build(); InterconnectAttachment response = edgeNetworkClient.getInterconnectAttachment(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getInterconnectAttachmentCallable
public final UnaryCallable<GetInterconnectAttachmentRequest,InterconnectAttachment> getInterconnectAttachmentCallable()Gets details of a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetInterconnectAttachmentRequest request = GetInterconnectAttachmentRequest.newBuilder() .setName( InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString()) .build(); ApiFuture<InterconnectAttachment> future = edgeNetworkClient.getInterconnectAttachmentCallable().futureCall(request); // Do something. InterconnectAttachment response = future.get(); } -
createInterconnectAttachmentAsync
public final OperationFuture<InterconnectAttachment,OperationMetadata> createInterconnectAttachmentAsync(ZoneName parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId) Creates a new InterconnectAttachment in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); String interconnectAttachmentId = "interconnectAttachmentId1053538636"; InterconnectAttachment response = edgeNetworkClient .createInterconnectAttachmentAsync( parent, interconnectAttachment, interconnectAttachmentId) .get(); }- Parameters:
parent- Required. Value for parent.interconnectAttachment- Required. The resource being createdinterconnectAttachmentId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and interconnect_attachment_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createInterconnectAttachmentAsync
public final OperationFuture<InterconnectAttachment,OperationMetadata> createInterconnectAttachmentAsync(String parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId) Creates a new InterconnectAttachment in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); InterconnectAttachment interconnectAttachment = InterconnectAttachment.newBuilder().build(); String interconnectAttachmentId = "interconnectAttachmentId1053538636"; InterconnectAttachment response = edgeNetworkClient .createInterconnectAttachmentAsync( parent, interconnectAttachment, interconnectAttachmentId) .get(); }- Parameters:
parent- Required. Value for parent.interconnectAttachment- Required. The resource being createdinterconnectAttachmentId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and interconnect_attachment_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createInterconnectAttachmentAsync
public final OperationFuture<InterconnectAttachment,OperationMetadata> createInterconnectAttachmentAsync(CreateInterconnectAttachmentRequest request) Creates a new InterconnectAttachment in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateInterconnectAttachmentRequest request = CreateInterconnectAttachmentRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setInterconnectAttachmentId("interconnectAttachmentId1053538636") .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) .setRequestId("requestId693933066") .build(); InterconnectAttachment response = edgeNetworkClient.createInterconnectAttachmentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createInterconnectAttachmentOperationCallable
public final OperationCallable<CreateInterconnectAttachmentRequest,InterconnectAttachment, createInterconnectAttachmentOperationCallable()OperationMetadata> Creates a new InterconnectAttachment in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateInterconnectAttachmentRequest request = CreateInterconnectAttachmentRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setInterconnectAttachmentId("interconnectAttachmentId1053538636") .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<InterconnectAttachment, OperationMetadata> future = edgeNetworkClient.createInterconnectAttachmentOperationCallable().futureCall(request); // Do something. InterconnectAttachment response = future.get(); } -
createInterconnectAttachmentCallable
public final UnaryCallable<CreateInterconnectAttachmentRequest,Operation> createInterconnectAttachmentCallable()Creates a new InterconnectAttachment in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateInterconnectAttachmentRequest request = CreateInterconnectAttachmentRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setInterconnectAttachmentId("interconnectAttachmentId1053538636") .setInterconnectAttachment(InterconnectAttachment.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.createInterconnectAttachmentCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteInterconnectAttachmentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInterconnectAttachmentAsync(InterconnectAttachmentName name) Deletes a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { InterconnectAttachmentName name = InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]"); edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteInterconnectAttachmentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInterconnectAttachmentAsync(String name) Deletes a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString(); edgeNetworkClient.deleteInterconnectAttachmentAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteInterconnectAttachmentAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInterconnectAttachmentAsync(DeleteInterconnectAttachmentRequest request) Deletes a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteInterconnectAttachmentRequest request = DeleteInterconnectAttachmentRequest.newBuilder() .setName( InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString()) .setRequestId("requestId693933066") .build(); edgeNetworkClient.deleteInterconnectAttachmentAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteInterconnectAttachmentOperationCallable
public final OperationCallable<DeleteInterconnectAttachmentRequest,com.google.protobuf.Empty, deleteInterconnectAttachmentOperationCallable()OperationMetadata> Deletes a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteInterconnectAttachmentRequest request = DeleteInterconnectAttachmentRequest.newBuilder() .setName( InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = edgeNetworkClient.deleteInterconnectAttachmentOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteInterconnectAttachmentCallable
public final UnaryCallable<DeleteInterconnectAttachmentRequest,Operation> deleteInterconnectAttachmentCallable()Deletes a single InterconnectAttachment.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteInterconnectAttachmentRequest request = DeleteInterconnectAttachmentRequest.newBuilder() .setName( InterconnectAttachmentName.of( "[PROJECT]", "[LOCATION]", "[ZONE]", "[INTERCONNECT_ATTACHMENT]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.deleteInterconnectAttachmentCallable().futureCall(request); // Do something. future.get(); } -
listRouters
Lists Routers in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListRoutersRequest- Throws:
ApiException- if the remote call fails
-
listRouters
Lists Routers in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); for (Router element : edgeNetworkClient.listRouters(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListRoutersRequest- Throws:
ApiException- if the remote call fails
-
listRouters
Lists Routers in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListRoutersRequest request = ListRoutersRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Router element : edgeNetworkClient.listRouters(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
-
listRoutersPagedCallable
public final UnaryCallable<ListRoutersRequest,EdgeNetworkClient.ListRoutersPagedResponse> listRoutersPagedCallable()Lists Routers in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListRoutersRequest request = ListRoutersRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Router> future = edgeNetworkClient.listRoutersPagedCallable().futureCall(request); // Do something. for (Router element : future.get().iterateAll()) { // doThingsWith(element); } } -
listRoutersCallable
Lists Routers in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListRoutersRequest request = ListRoutersRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListRoutersResponse response = edgeNetworkClient.listRoutersCallable().call(request); for (Router element : response.getRoutersList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getRouter
Gets details of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); Router response = edgeNetworkClient.getRouter(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getRouter
Gets details of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); Router response = edgeNetworkClient.getRouter(name); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
getRouter
Gets details of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetRouterRequest request = GetRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .build(); Router response = edgeNetworkClient.getRouter(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRouterCallable
Gets details of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetRouterRequest request = GetRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .build(); ApiFuture<Router> future = edgeNetworkClient.getRouterCallable().futureCall(request); // Do something. Router response = future.get(); } -
diagnoseRouter
Get the diagnostics of a single router resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name); }- Parameters:
name- Required. The name of the router resource.- Throws:
ApiException- if the remote call fails
-
diagnoseRouter
Get the diagnostics of a single router resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(name); }- Parameters:
name- Required. The name of the router resource.- Throws:
ApiException- if the remote call fails
-
diagnoseRouter
Get the diagnostics of a single router resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseRouterRequest request = DiagnoseRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .build(); DiagnoseRouterResponse response = edgeNetworkClient.diagnoseRouter(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
diagnoseRouterCallable
Get the diagnostics of a single router resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DiagnoseRouterRequest request = DiagnoseRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .build(); ApiFuture<DiagnoseRouterResponse> future = edgeNetworkClient.diagnoseRouterCallable().futureCall(request); // Do something. DiagnoseRouterResponse response = future.get(); } -
createRouterAsync
public final OperationFuture<Router,OperationMetadata> createRouterAsync(ZoneName parent, Router router, String routerId) Creates a new Router in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]"); Router router = Router.newBuilder().build(); String routerId = "routerId5435972"; Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get(); }- Parameters:
parent- Required. Value for parent.router- Required. The resource being createdrouterId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and router_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createRouterAsync
public final OperationFuture<Router,OperationMetadata> createRouterAsync(String parent, Router router, String routerId) Creates a new Router in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString(); Router router = Router.newBuilder().build(); String routerId = "routerId5435972"; Router response = edgeNetworkClient.createRouterAsync(parent, router, routerId).get(); }- Parameters:
parent- Required. Value for parent.router- Required. The resource being createdrouterId- Required. Id of the requesting object If auto-generating Id server-side, remove this field and router_id from the method_signature of Create RPC- Throws:
ApiException- if the remote call fails
-
createRouterAsync
public final OperationFuture<Router,OperationMetadata> createRouterAsync(CreateRouterRequest request) Creates a new Router in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateRouterRequest request = CreateRouterRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setRouterId("routerId5435972") .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); Router response = edgeNetworkClient.createRouterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createRouterOperationCallable
public final OperationCallable<CreateRouterRequest,Router, createRouterOperationCallable()OperationMetadata> Creates a new Router in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateRouterRequest request = CreateRouterRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setRouterId("routerId5435972") .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Router, OperationMetadata> future = edgeNetworkClient.createRouterOperationCallable().futureCall(request); // Do something. Router response = future.get(); } -
createRouterCallable
Creates a new Router in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { CreateRouterRequest request = CreateRouterRequest.newBuilder() .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[ZONE]").toString()) .setRouterId("routerId5435972") .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.createRouterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateRouterAsync
public final OperationFuture<Router,OperationMetadata> updateRouterAsync(Router router, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { Router router = Router.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Router response = edgeNetworkClient.updateRouterAsync(router, updateMask).get(); }- Parameters:
router- Required. The resource being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Router resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateRouterAsync
public final OperationFuture<Router,OperationMetadata> updateRouterAsync(UpdateRouterRequest request) Updates the parameters of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateRouterRequest request = UpdateRouterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); Router response = edgeNetworkClient.updateRouterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateRouterOperationCallable
public final OperationCallable<UpdateRouterRequest,Router, updateRouterOperationCallable()OperationMetadata> Updates the parameters of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateRouterRequest request = UpdateRouterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<Router, OperationMetadata> future = edgeNetworkClient.updateRouterOperationCallable().futureCall(request); // Do something. Router response = future.get(); } -
updateRouterCallable
Updates the parameters of a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { UpdateRouterRequest request = UpdateRouterRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setRouter(Router.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.updateRouterCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteRouterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(RouterName name) Deletes a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { RouterName name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]"); edgeNetworkClient.deleteRouterAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteRouterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(String name) Deletes a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { String name = RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString(); edgeNetworkClient.deleteRouterAsync(name).get(); }- Parameters:
name- Required. Name of the resource- Throws:
ApiException- if the remote call fails
-
deleteRouterAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRouterAsync(DeleteRouterRequest request) Deletes a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteRouterRequest request = DeleteRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .setRequestId("requestId693933066") .build(); edgeNetworkClient.deleteRouterAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteRouterOperationCallable
public final OperationCallable<DeleteRouterRequest,com.google.protobuf.Empty, deleteRouterOperationCallable()OperationMetadata> Deletes a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteRouterRequest request = DeleteRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = edgeNetworkClient.deleteRouterOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteRouterCallable
Deletes a single Router.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { DeleteRouterRequest request = DeleteRouterRequest.newBuilder() .setName(RouterName.of("[PROJECT]", "[LOCATION]", "[ZONE]", "[ROUTER]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = edgeNetworkClient.deleteRouterCallable().futureCall(request); // Do something. future.get(); } -
listLocations
public final EdgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : edgeNetworkClient.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,EdgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = edgeNetworkClient.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 (EdgeNetworkClient edgeNetworkClient = EdgeNetworkClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = edgeNetworkClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-