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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * HubName name = HubName.of("[PROJECT]", "[HUB]"); + * for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(HubName name) { + ListHubSpokesRequest request = + ListHubSpokesRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * String name = HubName.of("[PROJECT]", "[HUB]").toString(); + * for (Spoke element : hubServiceClient.listHubSpokes(name).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param name Required. The name of the hub. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListHubSpokesPagedResponse listHubSpokes(String name) { + ListHubSpokesRequest request = ListHubSpokesRequest.newBuilder().setName(name).build(); + return listHubSpokes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListHubSpokesRequest request = + * ListHubSpokesRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .addAllSpokeLocations(new ArrayList+ * + * @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 ListHubSpokesPagedResponse listHubSpokes(ListHubSpokesRequest request) { + return listHubSpokesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Network Connectivity Center spokes associated with a specified hub and location. The + * list includes both spokes that are attached to the hub and spokes that have been proposed but + * not yet accepted. + * + *()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (Spoke element : hubServiceClient.listHubSpokes(request).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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListHubSpokesRequest request = + * ListHubSpokesRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .addAllSpokeLocations(new ArrayList+ */ + public final UnaryCallable()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture future = hubServiceClient.listHubSpokesPagedCallable().futureCall(request); + * // Do something. + * for (Spoke 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) { + * ListHubSpokesRequest request = + * ListHubSpokesRequest.newBuilder() + * .setName(HubName.of("[PROJECT]", "[HUB]").toString()) + * .addAllSpokeLocations(new ArrayList+ */ + public final UnaryCallable()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .setOrderBy("orderBy-1207110587") + * .build(); + * while (true) { + * ListHubSpokesResponse response = hubServiceClient.listHubSpokesCallable().call(request); + * for (Spoke element : response.getSpokesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }
Sample code:
*
@@ -1441,23 +1630,31 @@ public final UnaryCallable Sample code:
*
@@ -1468,22 +1665,31 @@ public final OperationFuture Sample code:
*
@@ -1494,26 +1700,97 @@ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
*
@@ -1524,26 +1801,30 @@ public final OperationFuture Sample code:
*
@@ -1554,37 +1835,1567 @@ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ * Sample code:
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ * Sample code:
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(name, spokeUri).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub from which to reject the spoke.
+ * @param spokeUri Required. The URI of the spoke to reject from the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * RejectHubSpokeRequest request =
+ * RejectHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
* .setRequestId("requestId693933066")
+ * .setDetails("details1557721666")
* .build();
- * hubServiceClient.deleteSpokeAsync(request).get();
+ * RejectHubSpokeResponse response = hubServiceClient.rejectHubSpokeAsync(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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub into which to accept the spoke.
+ * @param spokeUri Required. The URI of the spoke to accept into the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub into which to accept the spoke.
+ * @param spokeUri Required. The URI of the spoke to accept into the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub into which to accept the spoke.
+ * @param spokeUri Required. The URI of the spoke to accept into the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * String spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(name, spokeUri).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub into which to accept the spoke.
+ * @param spokeUri Required. The URI of the spoke to accept into the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * AcceptHubSpokeRequest request =
+ * AcceptHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * AcceptHubSpokeResponse response = hubServiceClient.acceptHubSpokeAsync(request).get();
+ * }
+ * }
+ *
+ * @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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * AcceptHubSpokeRequest request =
+ * AcceptHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * AcceptHubSpokeRequest request =
+ * AcceptHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * SpokeName name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * hubServiceClient.deleteSpokeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the spoke to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * hubServiceClient.deleteSpokeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the spoke to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * DeleteSpokeRequest request =
+ * DeleteSpokeRequest.newBuilder()
+ * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * hubServiceClient.deleteSpokeAsync(request).get();
+ * }
+ * }
+ *
+ * @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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * DeleteSpokeRequest request =
+ * DeleteSpokeRequest.newBuilder()
+ * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * DeleteSpokeRequest request =
+ * DeleteSpokeRequest.newBuilder()
+ * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * RouteTableName name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+ * RouteTable response = hubServiceClient.getRouteTable(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route table resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RouteTable getRouteTable(RouteTableName name) {
+ GetRouteTableRequest request =
+ GetRouteTableRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRouteTable(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center route table.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+ * RouteTable response = hubServiceClient.getRouteTable(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route table resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RouteTable getRouteTable(String name) {
+ GetRouteTableRequest request = GetRouteTableRequest.newBuilder().setName(name).build();
+ return getRouteTable(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center route table.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetRouteTableRequest request =
+ * GetRouteTableRequest.newBuilder()
+ * .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+ * .build();
+ * RouteTable response = hubServiceClient.getRouteTable(request);
+ * }
+ * }
+ *
+ * @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 RouteTable getRouteTable(GetRouteTableRequest request) {
+ return getRouteTableCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center route table.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetRouteTableRequest request =
+ * GetRouteTableRequest.newBuilder()
+ * .setName(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubRouteName name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
+ * Route response = hubServiceClient.getRoute(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Route getRoute(HubRouteName name) {
+ GetRouteRequest request =
+ GetRouteRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRoute(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about the specified route.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString();
+ * Route response = hubServiceClient.getRoute(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Route getRoute(String name) {
+ GetRouteRequest request = GetRouteRequest.newBuilder().setName(name).build();
+ return getRoute(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about the specified route.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetRouteRequest request =
+ * GetRouteRequest.newBuilder()
+ * .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+ * .build();
+ * Route response = hubServiceClient.getRoute(request);
+ * }
+ * }
+ *
+ * @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 Route getRoute(GetRouteRequest request) {
+ return getRouteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about the specified route.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetRouteRequest request =
+ * GetRouteRequest.newBuilder()
+ * .setName(HubRouteName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * RouteTableName parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
+ * for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRoutesPagedResponse listRoutes(RouteTableName parent) {
+ ListRoutesRequest request =
+ ListRoutesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listRoutes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists routes in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String parent = RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString();
+ * for (Route element : hubServiceClient.listRoutes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRoutesPagedResponse listRoutes(String parent) {
+ ListRoutesRequest request = ListRoutesRequest.newBuilder().setParent(parent).build();
+ return listRoutes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists routes in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRoutesRequest request =
+ * ListRoutesRequest.newBuilder()
+ * .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Route element : hubServiceClient.listRoutes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListRoutesPagedResponse listRoutes(ListRoutesRequest request) {
+ return listRoutesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists routes in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRoutesRequest request =
+ * ListRoutesRequest.newBuilder()
+ * .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRoutesRequest request =
+ * ListRoutesRequest.newBuilder()
+ * .setParent(RouteTableName.of("[PROJECT]", "[HUB]", "[ROUTE_TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListRoutesResponse response = hubServiceClient.listRoutesCallable().call(request);
+ * for (Route element : response.getRoutesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubName parent = HubName.of("[PROJECT]", "[HUB]");
+ * for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRouteTablesPagedResponse listRouteTables(HubName parent) {
+ ListRouteTablesRequest request =
+ ListRouteTablesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listRouteTables(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists route tables in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+ * for (RouteTable element : hubServiceClient.listRouteTables(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRouteTablesPagedResponse listRouteTables(String parent) {
+ ListRouteTablesRequest request = ListRouteTablesRequest.newBuilder().setParent(parent).build();
+ return listRouteTables(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists route tables in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRouteTablesRequest request =
+ * ListRouteTablesRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (RouteTable element : hubServiceClient.listRouteTables(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListRouteTablesPagedResponse listRouteTables(ListRouteTablesRequest request) {
+ return listRouteTablesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists route tables in a given project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRouteTablesRequest request =
+ * ListRouteTablesRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListRouteTablesRequest request =
+ * ListRouteTablesRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListRouteTablesResponse response = hubServiceClient.listRouteTablesCallable().call(request);
+ * for (RouteTable element : response.getRouteTablesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GroupName name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]");
+ * Group response = hubServiceClient.getGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route table resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group getGroup(GroupName name) {
+ GetGroupRequest request =
+ GetGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString();
+ * Group response = hubServiceClient.getGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the route table resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Group getGroup(String name) {
+ GetGroupRequest request = GetGroupRequest.newBuilder().setName(name).build();
+ return getGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetGroupRequest request =
+ * GetGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .build();
+ * Group response = hubServiceClient.getGroup(request);
+ * }
+ * }
+ *
+ * @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 Group getGroup(GetGroupRequest request) {
+ return getGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center group.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetGroupRequest request =
+ * GetGroupRequest.newBuilder()
+ * .setName(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubName parent = HubName.of("[PROJECT]", "[HUB]");
+ * for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGroupsPagedResponse listGroups(HubName parent) {
+ ListGroupsRequest request =
+ ListGroupsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists groups in a given hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String parent = HubName.of("[PROJECT]", "[HUB]").toString();
+ * for (Group element : hubServiceClient.listGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGroupsPagedResponse listGroups(String parent) {
+ ListGroupsRequest request = ListGroupsRequest.newBuilder().setParent(parent).build();
+ return listGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists groups in a given hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Group element : hubServiceClient.listGroups(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListGroupsPagedResponse listGroups(ListGroupsRequest request) {
+ return listGroupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists groups in a given hub.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListGroupsRequest request =
+ * ListGroupsRequest.newBuilder()
+ * .setParent(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGroupsResponse response = hubServiceClient.listGroupsCallable().call(request);
+ * for (Group element : response.getGroupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : hubServiceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = hubServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = hubServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = hubServiceClient.setIamPolicy(request);
+ * }
+ * }
+ *
+ * @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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = hubServiceClient.getIamPolicy(request);
+ * }
+ * }
+ *
+ * @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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : policyBasedRoutingServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * policyBasedRoutingServiceClient.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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = policyBasedRoutingServiceClient.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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = policyBasedRoutingServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = policyBasedRoutingServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final 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 (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList
+ *
+ * @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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PolicyBasedRoutingServiceClient policyBasedRoutingServiceClient =
+ * PolicyBasedRoutingServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList
+ */
+ public final UnaryCallable