Class EdgeNetworkClient

java.lang.Object
com.google.cloud.edgenetwork.v1.EdgeNetworkClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class EdgeNetworkClient extends Object implements BackgroundResource
Service Description: EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.

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().

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

  • initializeZone(InitializeZoneRequest request)

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

  • initializeZone(ZoneName name)

  • initializeZone(String name)

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

  • initializeZoneCallable()

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.

  • listZones(ListZonesRequest request)

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

  • listZones(LocationName parent)

  • listZones(String parent)

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

  • listZonesPagedCallable()

  • listZonesCallable()

GetZone

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.

  • getZone(GetZoneRequest request)

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

  • getZone(ZoneName name)

  • getZone(String name)

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

  • getZoneCallable()

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.

  • listNetworks(ListNetworksRequest request)

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

  • listNetworks(ZoneName parent)

  • listNetworks(String parent)

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

  • listNetworksPagedCallable()

  • listNetworksCallable()

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.

  • getNetwork(GetNetworkRequest request)

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

  • getNetwork(NetworkName name)

  • getNetwork(String name)

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

  • getNetworkCallable()

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.

  • diagnoseNetwork(DiagnoseNetworkRequest request)

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

  • diagnoseNetwork(NetworkName name)

  • diagnoseNetwork(String name)

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

  • diagnoseNetworkCallable()

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.

  • createNetworkAsync(CreateNetworkRequest request)

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

  • createNetworkAsync(ZoneName parent, Network network, String networkId)

  • createNetworkAsync(String parent, Network network, String networkId)

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

  • createNetworkOperationCallable()

  • createNetworkCallable()

DeleteNetwork

Deletes a single Network.

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

  • deleteNetworkAsync(DeleteNetworkRequest request)

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

  • deleteNetworkAsync(NetworkName name)

  • deleteNetworkAsync(String name)

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

  • deleteNetworkOperationCallable()

  • deleteNetworkCallable()

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.

  • listSubnets(ListSubnetsRequest request)

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

  • listSubnets(ZoneName parent)

  • listSubnets(String parent)

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

  • listSubnetsPagedCallable()

  • listSubnetsCallable()

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.

  • getSubnet(GetSubnetRequest request)

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

  • getSubnet(SubnetName name)

  • getSubnet(String name)

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

  • getSubnetCallable()

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.

  • createSubnetAsync(CreateSubnetRequest request)

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

  • createSubnetAsync(ZoneName parent, Subnet subnet, String subnetId)

  • createSubnetAsync(String parent, Subnet subnet, String subnetId)

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

  • createSubnetOperationCallable()

  • createSubnetCallable()

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.

  • updateSubnetAsync(UpdateSubnetRequest request)

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

  • updateSubnetAsync(Subnet subnet, FieldMask updateMask)

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

  • updateSubnetOperationCallable()

  • updateSubnetCallable()

DeleteSubnet

Deletes a single Subnet.

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

  • deleteSubnetAsync(DeleteSubnetRequest request)

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

  • deleteSubnetAsync(SubnetName name)

  • deleteSubnetAsync(String name)

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

  • deleteSubnetOperationCallable()

  • deleteSubnetCallable()

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.

  • listInterconnects(ListInterconnectsRequest request)

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

  • listInterconnects(ZoneName parent)

  • listInterconnects(String parent)

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

  • listInterconnectsPagedCallable()

  • listInterconnectsCallable()

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.

  • getInterconnect(GetInterconnectRequest request)

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

  • getInterconnect(InterconnectName name)

  • getInterconnect(String name)

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

  • getInterconnectCallable()

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.

  • diagnoseInterconnect(DiagnoseInterconnectRequest request)

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

  • diagnoseInterconnect(InterconnectName name)

  • diagnoseInterconnect(String name)

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

  • diagnoseInterconnectCallable()

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.

  • listInterconnectAttachments(ListInterconnectAttachmentsRequest request)

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

  • listInterconnectAttachments(ZoneName parent)

  • listInterconnectAttachments(String parent)

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

  • listInterconnectAttachmentsPagedCallable()

  • listInterconnectAttachmentsCallable()

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.

  • getInterconnectAttachment(GetInterconnectAttachmentRequest request)

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

  • getInterconnectAttachment(InterconnectAttachmentName name)

  • getInterconnectAttachment(String name)

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

  • getInterconnectAttachmentCallable()

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.

  • createInterconnectAttachmentAsync(CreateInterconnectAttachmentRequest request)

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

  • createInterconnectAttachmentAsync(ZoneName parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId)

  • createInterconnectAttachmentAsync(String parent, InterconnectAttachment interconnectAttachment, String interconnectAttachmentId)

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

  • createInterconnectAttachmentOperationCallable()

  • createInterconnectAttachmentCallable()

DeleteInterconnectAttachment

Deletes a single InterconnectAttachment.

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

  • deleteInterconnectAttachmentAsync(DeleteInterconnectAttachmentRequest request)

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

  • deleteInterconnectAttachmentAsync(InterconnectAttachmentName name)

  • deleteInterconnectAttachmentAsync(String name)

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

  • deleteInterconnectAttachmentOperationCallable()

  • deleteInterconnectAttachmentCallable()

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.

  • listRouters(ListRoutersRequest request)

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

  • listRouters(ZoneName parent)

  • listRouters(String parent)

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

  • listRoutersPagedCallable()

  • listRoutersCallable()

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.

  • getRouter(GetRouterRequest request)

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

  • getRouter(RouterName name)

  • getRouter(String name)

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

  • getRouterCallable()

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.

  • diagnoseRouter(DiagnoseRouterRequest request)

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

  • diagnoseRouter(RouterName name)

  • diagnoseRouter(String name)

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

  • diagnoseRouterCallable()

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.

  • createRouterAsync(CreateRouterRequest request)

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

  • createRouterAsync(ZoneName parent, Router router, String routerId)

  • createRouterAsync(String parent, Router router, String routerId)

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

  • createRouterOperationCallable()

  • createRouterCallable()

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.

  • updateRouterAsync(UpdateRouterRequest request)

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

  • updateRouterAsync(Router router, FieldMask updateMask)

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

  • updateRouterOperationCallable()

  • updateRouterCallable()

DeleteRouter

Deletes a single Router.

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

  • deleteRouterAsync(DeleteRouterRequest request)

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

  • deleteRouterAsync(RouterName name)

  • deleteRouterAsync(String name)

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

  • deleteRouterOperationCallable()

  • deleteRouterCallable()

ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

See the individual methods for example code.

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

This class can be customized by passing in a custom instance of 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.

  • Constructor Details

    • EdgeNetworkClient

      protected EdgeNetworkClient(EdgeNetworkSettings settings) throws IOException
      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

      protected EdgeNetworkClient(EdgeNetworkStub stub)
  • Method Details

    • create

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

      public static final EdgeNetworkClient create(EdgeNetworkSettings settings) throws IOException
      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

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

      public final EdgeNetworkSettings getSettings()
    • getStub

      public EdgeNetworkStub getStub()
    • getOperationsClient

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

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

      public final InitializeZoneResponse initializeZone(ZoneName name)
      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

      public final InitializeZoneResponse initializeZone(String name)
      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

      public final InitializeZoneResponse initializeZone(InitializeZoneRequest request)
      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

      public final UnaryCallable<InitializeZoneRequest,InitializeZoneResponse> 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.
      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.
      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 public final UnaryCallable<ListZonesRequest,ListZonesResponse> 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 public final Zone getZone(ZoneName name)
      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 public final Zone getZone(String name)
      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 public final Zone getZone(GetZoneRequest request)
      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 public final UnaryCallable<GetZoneRequest,Zone> 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

      public final EdgeNetworkClient.ListNetworksPagedResponse listNetworks(ZoneName parent)
      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

      public final EdgeNetworkClient.ListNetworksPagedResponse listNetworks(String parent)
      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

      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

      public final UnaryCallable<ListNetworksRequest,ListNetworksResponse> 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

      public final Network getNetwork(NetworkName name)
      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

      public final Network getNetwork(String name)
      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

      public final Network getNetwork(GetNetworkRequest request)
      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

      public final UnaryCallable<GetNetworkRequest,Network> 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

      public final DiagnoseNetworkResponse diagnoseNetwork(NetworkName name)
      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

      public final DiagnoseNetworkResponse diagnoseNetwork(String name)
      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

      public final DiagnoseNetworkResponse diagnoseNetwork(DiagnoseNetworkRequest request)
      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 created
      networkId - 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 created
      networkId - 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,OperationMetadata> createNetworkOperationCallable()
      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

      public final UnaryCallable<CreateNetworkRequest,Operation> 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,OperationMetadata> deleteNetworkOperationCallable()
      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

      public final UnaryCallable<DeleteNetworkRequest,Operation> 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

      public final EdgeNetworkClient.ListSubnetsPagedResponse listSubnets(ZoneName parent)
      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

      public final EdgeNetworkClient.ListSubnetsPagedResponse listSubnets(String parent)
      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

      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

      public final UnaryCallable<ListSubnetsRequest,ListSubnetsResponse> 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

      public final Subnet getSubnet(SubnetName name)
      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

      public final Subnet getSubnet(String name)
      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

      public final Subnet getSubnet(GetSubnetRequest request)
      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

      public final UnaryCallable<GetSubnetRequest,Subnet> 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 created
      subnetId - 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 created
      subnetId - 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,OperationMetadata> createSubnetOperationCallable()
      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

      public final UnaryCallable<CreateSubnetRequest,Operation> 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 updated
      updateMask - 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,OperationMetadata> updateSubnetOperationCallable()
      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

      public final UnaryCallable<UpdateSubnetRequest,Operation> 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,OperationMetadata> deleteSubnetOperationCallable()
      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

      public final UnaryCallable<DeleteSubnetRequest,Operation> 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

      public final EdgeNetworkClient.ListInterconnectsPagedResponse listInterconnects(ZoneName parent)
      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

      public final EdgeNetworkClient.ListInterconnectsPagedResponse listInterconnects(String parent)
      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

      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

      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

      public final Interconnect getInterconnect(InterconnectName name)
      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

      public final Interconnect getInterconnect(String name)
      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

      public final Interconnect getInterconnect(GetInterconnectRequest request)
      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

      public final UnaryCallable<GetInterconnectRequest,Interconnect> 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

      public final DiagnoseInterconnectResponse diagnoseInterconnect(InterconnectName name)
      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

      public final DiagnoseInterconnectResponse diagnoseInterconnect(String name)
      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

      public final DiagnoseInterconnectResponse diagnoseInterconnect(DiagnoseInterconnectRequest request)
      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

      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

      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

      public final InterconnectAttachment getInterconnectAttachment(InterconnectAttachmentName name)
      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

      public final InterconnectAttachment getInterconnectAttachment(String name)
      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 created
      interconnectAttachmentId - 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 created
      interconnectAttachmentId - 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,OperationMetadata> createInterconnectAttachmentOperationCallable()
      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,OperationMetadata> deleteInterconnectAttachmentOperationCallable()
      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

      public final EdgeNetworkClient.ListRoutersPagedResponse listRouters(ZoneName parent)
      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

      public final EdgeNetworkClient.ListRoutersPagedResponse listRouters(String parent)
      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

      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

      public final UnaryCallable<ListRoutersRequest,ListRoutersResponse> 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

      public final Router getRouter(RouterName name)
      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

      public final Router getRouter(String name)
      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

      public final Router getRouter(GetRouterRequest request)
      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

      public final UnaryCallable<GetRouterRequest,Router> 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

      public final DiagnoseRouterResponse diagnoseRouter(RouterName name)
      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

      public final DiagnoseRouterResponse diagnoseRouter(String name)
      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

      public final DiagnoseRouterResponse diagnoseRouter(DiagnoseRouterRequest request)
      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

      public final UnaryCallable<DiagnoseRouterRequest,DiagnoseRouterResponse> 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 created
      routerId - 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 created
      routerId - 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,OperationMetadata> createRouterOperationCallable()
      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

      public final UnaryCallable<CreateRouterRequest,Operation> 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 updated
      updateMask - 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,OperationMetadata> updateRouterOperationCallable()
      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

      public final UnaryCallable<UpdateRouterRequest,Operation> 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,OperationMetadata> deleteRouterOperationCallable()
      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

      public final UnaryCallable<DeleteRouterRequest,Operation> 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

      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

      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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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

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

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (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:
      close in interface AutoCloseable
    • shutdown

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

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

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

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

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