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: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
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: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require 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: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require 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: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require 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. + */ +@Generated("by gapic-generator-java") +public class EdgeNetworkClient implements BackgroundResource { + private final EdgeNetworkSettings settings; + private final EdgeNetworkStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of EdgeNetworkClient with default settings. */ + public static final EdgeNetworkClient create() throws IOException { + return create(EdgeNetworkSettings.newBuilder().build()); + } + + /** + * 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. + */ + public static final EdgeNetworkClient create(EdgeNetworkSettings settings) throws IOException { + return new EdgeNetworkClient(settings); + } + + /** + * Constructs an instance of EdgeNetworkClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(EdgeNetworkSettings). + */ + public static final EdgeNetworkClient create(EdgeNetworkStub stub) { + return new EdgeNetworkClient(stub); + } + + /** + * 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. + */ + protected EdgeNetworkClient(EdgeNetworkSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EdgeNetworkStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected EdgeNetworkClient(EdgeNetworkStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final EdgeNetworkSettings getSettings() { + return settings; + } + + public EdgeNetworkStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the zone resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InitializeZoneResponse initializeZone(ZoneName name) { + InitializeZoneRequest request = + InitializeZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return initializeZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the zone resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InitializeZoneResponse initializeZone(String name) { + InitializeZoneRequest request = InitializeZoneRequest.newBuilder().setName(name).build(); + return initializeZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InitializeZoneResponse initializeZone(InitializeZoneRequest request) { + return initializeZoneCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * InitializeZone will initialize resources for a zone in a project. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.initializeZoneCallable().futureCall(request); + * // Do something. + * InitializeZoneResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListZonesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(LocationName parent) { + ListZonesRequest request = + ListZonesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListZonesRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(String parent) { + ListZonesRequest request = ListZonesRequest.newBuilder().setParent(parent).build(); + return listZones(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListZonesPagedResponse listZones(ListZonesRequest request) { + return listZonesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Zones in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.listZonesPagedCallable().futureCall(request); + * // Do something. + * for (Zone element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(ZoneName name) { + GetZoneRequest request = + GetZoneRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(String name) { + GetZoneRequest request = GetZoneRequest.newBuilder().setName(name).build(); + return getZone(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Zone getZone(GetZoneRequest request) { + return getZoneCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Zone. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.getZoneCallable().futureCall(request); + * // Do something. + * Zone response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListNetworksRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworksPagedResponse listNetworks(ZoneName parent) { + ListNetworksRequest request = + ListNetworksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListNetworksRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworksPagedResponse listNetworks(String parent) { + ListNetworksRequest request = ListNetworksRequest.newBuilder().setParent(parent).build(); + return listNetworks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNetworksPagedResponse listNetworks(ListNetworksRequest request) { + return listNetworksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Networks in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.listNetworksPagedCallable().futureCall(request); + * // Do something. + * for (Network element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Network getNetwork(NetworkName name) { + GetNetworkRequest request = + GetNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Network getNetwork(String name) { + GetNetworkRequest request = GetNetworkRequest.newBuilder().setName(name).build(); + return getNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Network getNetwork(GetNetworkRequest request) { + return getNetworkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Network. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.getNetworkCallable().futureCall(request); + * // Do something. + * Network response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the network resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseNetworkResponse diagnoseNetwork(NetworkName name) { + DiagnoseNetworkRequest request = + DiagnoseNetworkRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return diagnoseNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the network resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseNetworkResponse diagnoseNetwork(String name) { + DiagnoseNetworkRequest request = DiagnoseNetworkRequest.newBuilder().setName(name).build(); + return diagnoseNetwork(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseNetworkResponse diagnoseNetwork(DiagnoseNetworkRequest request) { + return diagnoseNetworkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single network resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.diagnoseNetworkCallable().futureCall(request); + * // Do something. + * DiagnoseNetworkResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param network Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param network Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.createNetworkOperationCallable().futureCall(request); + * // Do something. + * Network response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.createNetworkCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.deleteNetworkOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.deleteNetworkCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListSubnetsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(ZoneName parent) { + ListSubnetsRequest request = + ListSubnetsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListSubnetsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(String parent) { + ListSubnetsRequest request = ListSubnetsRequest.newBuilder().setParent(parent).build(); + return listSubnets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSubnetsPagedResponse listSubnets(ListSubnetsRequest request) { + return listSubnetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Subnets in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.listSubnetsPagedCallable().futureCall(request); + * // Do something. + * for (Subnet element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(SubnetName name) { + GetSubnetRequest request = + GetSubnetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(String name) { + GetSubnetRequest request = GetSubnetRequest.newBuilder().setName(name).build(); + return getSubnet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Subnet getSubnet(GetSubnetRequest request) { + return getSubnetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Subnet. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.getSubnetCallable().futureCall(request); + * // Do something. + * Subnet response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param subnet Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param subnet Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.createSubnetOperationCallable().futureCall(request); + * // Do something. + * Subnet response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.createSubnetCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param subnet Required. The resource being updated + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.updateSubnetOperationCallable().futureCall(request); + * // Do something. + * Subnet response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.updateSubnetCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.deleteSubnetOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.deleteSubnetCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInterconnectsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectsPagedResponse listInterconnects(ZoneName parent) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInterconnects(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInterconnectsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectsPagedResponse listInterconnects(String parent) { + ListInterconnectsRequest request = + ListInterconnectsRequest.newBuilder().setParent(parent).build(); + return listInterconnects(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectsPagedResponse listInterconnects(ListInterconnectsRequest request) { + return listInterconnectsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Interconnects in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.listInterconnectsPagedCallable().futureCall(request); + * // Do something. + * for (Interconnect element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Interconnect getInterconnect(InterconnectName name) { + GetInterconnectRequest request = + GetInterconnectRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Interconnect getInterconnect(String name) { + GetInterconnectRequest request = GetInterconnectRequest.newBuilder().setName(name).build(); + return getInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Interconnect getInterconnect(GetInterconnectRequest request) { + return getInterconnectCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Interconnect. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.getInterconnectCallable().futureCall(request); + * // Do something. + * Interconnect response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the interconnect resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseInterconnectResponse diagnoseInterconnect(InterconnectName name) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return diagnoseInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the interconnect resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseInterconnectResponse diagnoseInterconnect(String name) { + DiagnoseInterconnectRequest request = + DiagnoseInterconnectRequest.newBuilder().setName(name).build(); + return diagnoseInterconnect(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseInterconnectResponse diagnoseInterconnect( + DiagnoseInterconnectRequest request) { + return diagnoseInterconnectCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single interconnect resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.diagnoseInterconnectCallable().futureCall(request); + * // Do something. + * DiagnoseInterconnectResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInterconnectAttachmentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachments( + ZoneName parent) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listInterconnectAttachments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListInterconnectAttachmentsRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachments(String parent) { + ListInterconnectAttachmentsRequest request = + ListInterconnectAttachmentsRequest.newBuilder().setParent(parent).build(); + return listInterconnectAttachments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInterconnectAttachmentsPagedResponse listInterconnectAttachments( + ListInterconnectAttachmentsRequest request) { + return listInterconnectAttachmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsPagedResponse> + listInterconnectAttachmentsPagedCallable() { + return stub.listInterconnectAttachmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists InterconnectAttachments in a given project and location. + * + *future = + * edgeNetworkClient.listInterconnectAttachmentsPagedCallable().futureCall(request); + * // Do something. + * for (InterconnectAttachment element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable< + ListInterconnectAttachmentsRequest, ListInterconnectAttachmentsResponse> + listInterconnectAttachmentsCallable() { + return stub.listInterconnectAttachmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InterconnectAttachment getInterconnectAttachment(InterconnectAttachmentName name) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getInterconnectAttachment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InterconnectAttachment getInterconnectAttachment(String name) { + GetInterconnectAttachmentRequest request = + GetInterconnectAttachmentRequest.newBuilder().setName(name).build(); + return getInterconnectAttachment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final InterconnectAttachment getInterconnectAttachment( + GetInterconnectAttachmentRequest request) { + return getInterconnectAttachmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single InterconnectAttachment. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.getInterconnectAttachmentCallable().futureCall(request); + * // Do something. + * InterconnectAttachment response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param interconnectAttachment Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param interconnectAttachment Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallable< + CreateInterconnectAttachmentRequest, InterconnectAttachment, OperationMetadata> + createInterconnectAttachmentOperationCallable() { + return stub.createInterconnectAttachmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new InterconnectAttachment in a given project and location. + * + *future = + * edgeNetworkClient.createInterconnectAttachmentOperationCallable().futureCall(request); + * // Do something. + * InterconnectAttachment response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.createInterconnectAttachmentCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.deleteInterconnectAttachmentOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.deleteInterconnectAttachmentCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListRoutersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutersPagedResponse listRouters(ZoneName parent) { + ListRoutersRequest request = + ListRoutersRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRouters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param parent Required. Parent value for ListRoutersRequest + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutersPagedResponse listRouters(String parent) { + ListRoutersRequest request = ListRoutersRequest.newBuilder().setParent(parent).build(); + return listRouters(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRoutersPagedResponse listRouters(ListRoutersRequest request) { + return listRoutersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Routers in a given project and location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.listRoutersPagedCallable().futureCall(request); + * // Do something. + * for (Router element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Router getRouter(RouterName name) { + GetRouterRequest request = + GetRouterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Router getRouter(String name) { + GetRouterRequest request = GetRouterRequest.newBuilder().setName(name).build(); + return getRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Router getRouter(GetRouterRequest request) { + return getRouterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Router. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.getRouterCallable().futureCall(request); + * // Do something. + * Router response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the router resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseRouterResponse diagnoseRouter(RouterName name) { + DiagnoseRouterRequest request = + DiagnoseRouterRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return diagnoseRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param name Required. The name of the router resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseRouterResponse diagnoseRouter(String name) { + DiagnoseRouterRequest request = DiagnoseRouterRequest.newBuilder().setName(name).build(); + return diagnoseRouter(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DiagnoseRouterResponse diagnoseRouter(DiagnoseRouterRequest request) { + return diagnoseRouterCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get the diagnostics of a single router resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.diagnoseRouterCallable().futureCall(request); + * // Do something. + * DiagnoseRouterResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param router Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param parent Required. Value for parent. + * @param router Required. The resource being created + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.createRouterOperationCallable().futureCall(request); + * // Do something. + * Router response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.createRouterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param router Required. The resource being updated + * @param 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 com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.updateRouterOperationCallable().futureCall(request); + * // Do something. + * Router response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.updateRouterCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param name Required. Name of the resource + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final OperationCallablefuture = + * edgeNetworkClient.deleteRouterOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.deleteRouterCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = + * edgeNetworkClient.listLocationsPagedCallable().futureCall(request); + * // Do something. + * for (Location element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying 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+ */ + public final UnaryCallablefuture = edgeNetworkClient.getLocationCallable().futureCall(request); + * // Do something. + * Location response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of initializeZone to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require 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.Builder edgeNetworkSettingsBuilder = EdgeNetworkSettings.newBuilder(); + * edgeNetworkSettingsBuilder + * .initializeZoneSettings() + * .setRetrySettings( + * edgeNetworkSettingsBuilder + * .initializeZoneSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * EdgeNetworkSettings edgeNetworkSettings = edgeNetworkSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class EdgeNetworkSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= EdgeNetworkClient =======================
+ *
+ * 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.
+ *
+ * Sample for EdgeNetworkClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class EdgeNetworkStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.edgenetwork.v1;
+
+import javax.annotation.Generated;
diff --git a/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java
new file mode 100644
index 000000000000..7935ca5a10a9
--- /dev/null
+++ b/java-edgenetwork/google-cloud-edgenetwork/src/main/java/com/google/cloud/edgenetwork/v1/stub/EdgeNetworkStub.java
@@ -0,0 +1,307 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.edgenetwork.v1.stub;
+
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectAttachmentsPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListInterconnectsPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListLocationsPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListNetworksPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListRoutersPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListSubnetsPagedResponse;
+import static com.google.cloud.edgenetwork.v1.EdgeNetworkClient.ListZonesPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest;
+import com.google.cloud.edgenetwork.v1.CreateNetworkRequest;
+import com.google.cloud.edgenetwork.v1.CreateRouterRequest;
+import com.google.cloud.edgenetwork.v1.CreateSubnetRequest;
+import com.google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest;
+import com.google.cloud.edgenetwork.v1.DeleteNetworkRequest;
+import com.google.cloud.edgenetwork.v1.DeleteRouterRequest;
+import com.google.cloud.edgenetwork.v1.DeleteSubnetRequest;
+import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest;
+import com.google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse;
+import com.google.cloud.edgenetwork.v1.DiagnoseNetworkRequest;
+import com.google.cloud.edgenetwork.v1.DiagnoseNetworkResponse;
+import com.google.cloud.edgenetwork.v1.DiagnoseRouterRequest;
+import com.google.cloud.edgenetwork.v1.DiagnoseRouterResponse;
+import com.google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest;
+import com.google.cloud.edgenetwork.v1.GetInterconnectRequest;
+import com.google.cloud.edgenetwork.v1.GetNetworkRequest;
+import com.google.cloud.edgenetwork.v1.GetRouterRequest;
+import com.google.cloud.edgenetwork.v1.GetSubnetRequest;
+import com.google.cloud.edgenetwork.v1.GetZoneRequest;
+import com.google.cloud.edgenetwork.v1.InitializeZoneRequest;
+import com.google.cloud.edgenetwork.v1.InitializeZoneResponse;
+import com.google.cloud.edgenetwork.v1.Interconnect;
+import com.google.cloud.edgenetwork.v1.InterconnectAttachment;
+import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest;
+import com.google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse;
+import com.google.cloud.edgenetwork.v1.ListInterconnectsRequest;
+import com.google.cloud.edgenetwork.v1.ListInterconnectsResponse;
+import com.google.cloud.edgenetwork.v1.ListNetworksRequest;
+import com.google.cloud.edgenetwork.v1.ListNetworksResponse;
+import com.google.cloud.edgenetwork.v1.ListRoutersRequest;
+import com.google.cloud.edgenetwork.v1.ListRoutersResponse;
+import com.google.cloud.edgenetwork.v1.ListSubnetsRequest;
+import com.google.cloud.edgenetwork.v1.ListSubnetsResponse;
+import com.google.cloud.edgenetwork.v1.ListZonesRequest;
+import com.google.cloud.edgenetwork.v1.ListZonesResponse;
+import com.google.cloud.edgenetwork.v1.Network;
+import com.google.cloud.edgenetwork.v1.OperationMetadata;
+import com.google.cloud.edgenetwork.v1.Router;
+import com.google.cloud.edgenetwork.v1.Subnet;
+import com.google.cloud.edgenetwork.v1.UpdateRouterRequest;
+import com.google.cloud.edgenetwork.v1.UpdateSubnetRequest;
+import com.google.cloud.edgenetwork.v1.Zone;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the EdgeNetwork service API.
+ *
+ *