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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfigName name =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.getMulticloudDataTransferConfig(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the DataTransferServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
ListMulticloudDataTransferConfigs |
+ * Lists the `MulticloudDataTransferConfig` resources in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetMulticloudDataTransferConfig |
+ * Gets the details of a `MulticloudDataTransferConfig` resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateMulticloudDataTransferConfig |
+ * Creates a `MulticloudDataTransferConfig` resource in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateMulticloudDataTransferConfig |
+ * Updates a `MulticloudDataTransferConfig` resource in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteMulticloudDataTransferConfig |
+ * Deletes a `MulticloudDataTransferConfig` resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListDestinations |
+ * Lists the `Destination` resources in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetDestination |
+ * Gets the details of a `Destination` resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateDestination |
+ * Creates a `Destination` resource in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateDestination |
+ * Updates a `Destination` resource in a specified project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteDestination |
+ * Deletes a `Destination` resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetMulticloudDataTransferSupportedService |
+ * Gets the details of a service that is supported for Data Transfer Essentials. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListMulticloudDataTransferSupportedServices |
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service.This method can be called in two ways: + * * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SetIamPolicy |
+ * Sets the access control policy on the specified resource. Replacesany existing policy. + * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetIamPolicy |
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
TestIamPermissions |
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of DataTransferServiceSettings 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
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ * DataTransferServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ * DataTransferServiceClient.create(dataTransferServiceSettings);
+ * }
+ *
+ * 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
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ * DataTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ * DataTransferServiceClient.create(dataTransferServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class DataTransferServiceClient implements BackgroundResource { + private final DataTransferServiceSettings settings; + private final DataTransferServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of DataTransferServiceClient with default settings. */ + public static final DataTransferServiceClient create() throws IOException { + return create(DataTransferServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient create(DataTransferServiceSettings settings) + throws IOException { + return new DataTransferServiceClient(settings); + } + + /** + * Constructs an instance of DataTransferServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(DataTransferServiceSettings). + */ + public static final DataTransferServiceClient create(DataTransferServiceStub stub) { + return new DataTransferServiceClient(stub); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient(DataTransferServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataTransferServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + protected DataTransferServiceClient(DataTransferServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataTransferServiceSettings getSettings() { + return settings; + } + + public DataTransferServiceStub 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 OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (MulticloudDataTransferConfig element :
+ * dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(
+ LocationName parent) {
+ ListMulticloudDataTransferConfigsRequest request =
+ ListMulticloudDataTransferConfigsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMulticloudDataTransferConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (MulticloudDataTransferConfig element :
+ * dataTransferServiceClient.listMulticloudDataTransferConfigs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(
+ String parent) {
+ ListMulticloudDataTransferConfigsRequest request =
+ ListMulticloudDataTransferConfigsRequest.newBuilder().setParent(parent).build();
+ return listMulticloudDataTransferConfigs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferConfigsRequest request =
+ * ListMulticloudDataTransferConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (MulticloudDataTransferConfig element :
+ * dataTransferServiceClient.listMulticloudDataTransferConfigs(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 ListMulticloudDataTransferConfigsPagedResponse listMulticloudDataTransferConfigs(
+ ListMulticloudDataTransferConfigsRequest request) {
+ return listMulticloudDataTransferConfigsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferConfigsRequest request =
+ * ListMulticloudDataTransferConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferConfigsPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (MulticloudDataTransferConfig element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsPagedResponse>
+ listMulticloudDataTransferConfigsPagedCallable() {
+ return stub.listMulticloudDataTransferConfigsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `MulticloudDataTransferConfig` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferConfigsRequest request =
+ * ListMulticloudDataTransferConfigsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * ListMulticloudDataTransferConfigsResponse response =
+ * dataTransferServiceClient.listMulticloudDataTransferConfigsCallable().call(request);
+ * for (MulticloudDataTransferConfig element :
+ * response.getMulticloudDataTransferConfigsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListMulticloudDataTransferConfigsRequest, ListMulticloudDataTransferConfigsResponse>
+ listMulticloudDataTransferConfigsCallable() {
+ return stub.listMulticloudDataTransferConfigsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `MulticloudDataTransferConfig` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfigName name =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.getMulticloudDataTransferConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the `MulticloudDataTransferConfig` resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MulticloudDataTransferConfig getMulticloudDataTransferConfig(
+ MulticloudDataTransferConfigName name) {
+ GetMulticloudDataTransferConfigRequest request =
+ GetMulticloudDataTransferConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getMulticloudDataTransferConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `MulticloudDataTransferConfig` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String name =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString();
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.getMulticloudDataTransferConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the `MulticloudDataTransferConfig` resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MulticloudDataTransferConfig getMulticloudDataTransferConfig(String name) {
+ GetMulticloudDataTransferConfigRequest request =
+ GetMulticloudDataTransferConfigRequest.newBuilder().setName(name).build();
+ return getMulticloudDataTransferConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `MulticloudDataTransferConfig` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetMulticloudDataTransferConfigRequest request =
+ * GetMulticloudDataTransferConfigRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .build();
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.getMulticloudDataTransferConfig(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 MulticloudDataTransferConfig getMulticloudDataTransferConfig(
+ GetMulticloudDataTransferConfigRequest request) {
+ return getMulticloudDataTransferConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `MulticloudDataTransferConfig` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetMulticloudDataTransferConfigRequest request =
+ * GetMulticloudDataTransferConfigRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.getMulticloudDataTransferConfigCallable().futureCall(request);
+ * // Do something.
+ * MulticloudDataTransferConfig response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * MulticloudDataTransferConfig multicloudDataTransferConfig =
+ * MulticloudDataTransferConfig.newBuilder().build();
+ * String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient
+ * .createMulticloudDataTransferConfigAsync(
+ * parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to
+ * create.
+ * @param multicloudDataTransferConfigId Required. The ID to use for the
+ * `MulticloudDataTransferConfig` resource, which becomes the final component of the
+ * `MulticloudDataTransferConfig` resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * MulticloudDataTransferConfig multicloudDataTransferConfig =
+ * MulticloudDataTransferConfig.newBuilder().build();
+ * String multicloudDataTransferConfigId = "multicloudDataTransferConfigId-1067608178";
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient
+ * .createMulticloudDataTransferConfigAsync(
+ * parent, multicloudDataTransferConfig, multicloudDataTransferConfigId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to
+ * create.
+ * @param multicloudDataTransferConfigId Required. The ID to use for the
+ * `MulticloudDataTransferConfig` resource, which becomes the final component of the
+ * `MulticloudDataTransferConfig` resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateMulticloudDataTransferConfigRequest request =
+ * CreateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.createMulticloudDataTransferConfigAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateMulticloudDataTransferConfigRequest request =
+ * CreateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient
+ * .createMulticloudDataTransferConfigOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * MulticloudDataTransferConfig response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ CreateMulticloudDataTransferConfigRequest,
+ MulticloudDataTransferConfig,
+ OperationMetadata>
+ createMulticloudDataTransferConfigOperationCallable() {
+ return stub.createMulticloudDataTransferConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateMulticloudDataTransferConfigRequest request =
+ * CreateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setMulticloudDataTransferConfigId("multicloudDataTransferConfigId-1067608178")
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .createMulticloudDataTransferConfigCallable()
+ * .futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfig multicloudDataTransferConfig =
+ * MulticloudDataTransferConfig.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient
+ * .updateMulticloudDataTransferConfigAsync(multicloudDataTransferConfig, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param multicloudDataTransferConfig Required. The `MulticloudDataTransferConfig` resource to
+ * update.
+ * @param updateMask Optional. `FieldMask` is used to specify the fields in the
+ * `MulticloudDataTransferConfig` resource to be overwritten by the update. The fields
+ * specified in `update_mask` are relative to the resource, not the full request. A field is
+ * overwritten if it is in the mask. If you don't specify a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateMulticloudDataTransferConfigRequest request =
+ * UpdateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * MulticloudDataTransferConfig response =
+ * dataTransferServiceClient.updateMulticloudDataTransferConfigAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateMulticloudDataTransferConfigRequest request =
+ * UpdateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient
+ * .updateMulticloudDataTransferConfigOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * MulticloudDataTransferConfig response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UpdateMulticloudDataTransferConfigRequest,
+ MulticloudDataTransferConfig,
+ OperationMetadata>
+ updateMulticloudDataTransferConfigOperationCallable() {
+ return stub.updateMulticloudDataTransferConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a `MulticloudDataTransferConfig` resource in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateMulticloudDataTransferConfigRequest request =
+ * UpdateMulticloudDataTransferConfigRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setMulticloudDataTransferConfig(MulticloudDataTransferConfig.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .updateMulticloudDataTransferConfigCallable()
+ * .futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfigName name =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ * dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `MulticloudDataTransferConfig` resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String name =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString();
+ * dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `MulticloudDataTransferConfig` resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteMulticloudDataTransferConfigRequest request =
+ * DeleteMulticloudDataTransferConfigRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * dataTransferServiceClient.deleteMulticloudDataTransferConfigAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteMulticloudDataTransferConfigRequest request =
+ * DeleteMulticloudDataTransferConfigRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient
+ * .deleteMulticloudDataTransferConfigOperationCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ DeleteMulticloudDataTransferConfigRequest, Empty, OperationMetadata>
+ deleteMulticloudDataTransferConfigOperationCallable() {
+ return stub.deleteMulticloudDataTransferConfigOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a `MulticloudDataTransferConfig` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteMulticloudDataTransferConfigRequest request =
+ * DeleteMulticloudDataTransferConfigRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .deleteMulticloudDataTransferConfigCallable()
+ * .futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfigName parent =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ * for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDestinationsPagedResponse listDestinations(
+ MulticloudDataTransferConfigName parent) {
+ ListDestinationsRequest request =
+ ListDestinationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDestinations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String parent =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString();
+ * for (Destination element : dataTransferServiceClient.listDestinations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDestinationsPagedResponse listDestinations(String parent) {
+ ListDestinationsRequest request =
+ ListDestinationsRequest.newBuilder().setParent(parent).build();
+ return listDestinations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListDestinationsRequest request =
+ * ListDestinationsRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (Destination element : dataTransferServiceClient.listDestinations(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 ListDestinationsPagedResponse listDestinations(ListDestinationsRequest request) {
+ return listDestinationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the `Destination` resources in a specified 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListDestinationsRequest request =
+ * ListDestinationsRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.listDestinationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Destination element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListDestinationsRequest request =
+ * ListDestinationsRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * ListDestinationsResponse response =
+ * dataTransferServiceClient.listDestinationsCallable().call(request);
+ * for (Destination element : response.getDestinationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DestinationName name =
+ * DestinationName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]");
+ * Destination response = dataTransferServiceClient.getDestination(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Destination` resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Destination getDestination(DestinationName name) {
+ GetDestinationRequest request =
+ GetDestinationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDestination(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `Destination` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String name =
+ * DestinationName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]")
+ * .toString();
+ * Destination response = dataTransferServiceClient.getDestination(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Destination` resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Destination getDestination(String name) {
+ GetDestinationRequest request = GetDestinationRequest.newBuilder().setName(name).build();
+ return getDestination(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `Destination` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetDestinationRequest request =
+ * GetDestinationRequest.newBuilder()
+ * .setName(
+ * DestinationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+ * "[DESTINATION]")
+ * .toString())
+ * .build();
+ * Destination response = dataTransferServiceClient.getDestination(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 Destination getDestination(GetDestinationRequest request) {
+ return getDestinationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a `Destination` 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetDestinationRequest request =
+ * GetDestinationRequest.newBuilder()
+ * .setName(
+ * DestinationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+ * "[DESTINATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.getDestinationCallable().futureCall(request);
+ * // Do something.
+ * Destination response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferConfigName parent =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]");
+ * Destination destination = Destination.newBuilder().build();
+ * String destinationId = "destinationId306545097";
+ * Destination response =
+ * dataTransferServiceClient
+ * .createDestinationAsync(parent, destination, destinationId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @param destination Required. The `Destination` resource to create.
+ * @param destinationId Required. The ID to use for the `Destination` resource, which becomes the
+ * final component of the `Destination` resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String parent =
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString();
+ * Destination destination = Destination.newBuilder().build();
+ * String destinationId = "destinationId306545097";
+ * Destination response =
+ * dataTransferServiceClient
+ * .createDestinationAsync(parent, destination, destinationId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @param destination Required. The `Destination` resource to create.
+ * @param destinationId Required. The ID to use for the `Destination` resource, which becomes the
+ * final component of the `Destination` resource name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateDestinationRequest request =
+ * CreateDestinationRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setDestinationId("destinationId306545097")
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Destination response = dataTransferServiceClient.createDestinationAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateDestinationRequest request =
+ * CreateDestinationRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setDestinationId("destinationId306545097")
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient.createDestinationOperationCallable().futureCall(request);
+ * // Do something.
+ * Destination response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * CreateDestinationRequest request =
+ * CreateDestinationRequest.newBuilder()
+ * .setParent(
+ * MulticloudDataTransferConfigName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]")
+ * .toString())
+ * .setDestinationId("destinationId306545097")
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.createDestinationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * Destination destination = Destination.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Destination response =
+ * dataTransferServiceClient.updateDestinationAsync(destination, updateMask).get();
+ * }
+ * }
+ *
+ * @param destination Required. The `Destination` resource to update.
+ * @param updateMask Optional. `FieldMask is used to specify the fields to be overwritten in the
+ * `Destination` resource by the update. The fields specified in `update_mask` are relative to
+ * the resource, not the full request. A field is overwritten if it is in the mask. If you
+ * don't specify a mask, all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateDestinationRequest request =
+ * UpdateDestinationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Destination response = dataTransferServiceClient.updateDestinationAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateDestinationRequest request =
+ * UpdateDestinationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient.updateDestinationOperationCallable().futureCall(request);
+ * // Do something.
+ * Destination response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * UpdateDestinationRequest request =
+ * UpdateDestinationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setDestination(Destination.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.updateDestinationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DestinationName name =
+ * DestinationName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]");
+ * dataTransferServiceClient.deleteDestinationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Destination` resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String name =
+ * DestinationName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_CONFIG]", "[DESTINATION]")
+ * .toString();
+ * dataTransferServiceClient.deleteDestinationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Destination` resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteDestinationRequest request =
+ * DeleteDestinationRequest.newBuilder()
+ * .setName(
+ * DestinationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+ * "[DESTINATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * dataTransferServiceClient.deleteDestinationAsync(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 OperationFutureSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteDestinationRequest request =
+ * DeleteDestinationRequest.newBuilder()
+ * .setName(
+ * DestinationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+ * "[DESTINATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * dataTransferServiceClient.deleteDestinationOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * DeleteDestinationRequest request =
+ * DeleteDestinationRequest.newBuilder()
+ * .setName(
+ * DestinationName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[MULTICLOUD_DATA_TRANSFER_CONFIG]",
+ * "[DESTINATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.deleteDestinationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * MulticloudDataTransferSupportedServiceName name =
+ * MulticloudDataTransferSupportedServiceName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]");
+ * MulticloudDataTransferSupportedService response =
+ * dataTransferServiceClient.getMulticloudDataTransferSupportedService(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(
+ MulticloudDataTransferSupportedServiceName name) {
+ GetMulticloudDataTransferSupportedServiceRequest request =
+ GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getMulticloudDataTransferSupportedService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a service that is supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String name =
+ * MulticloudDataTransferSupportedServiceName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
+ * .toString();
+ * MulticloudDataTransferSupportedService response =
+ * dataTransferServiceClient.getMulticloudDataTransferSupportedService(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the service.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(
+ String name) {
+ GetMulticloudDataTransferSupportedServiceRequest request =
+ GetMulticloudDataTransferSupportedServiceRequest.newBuilder().setName(name).build();
+ return getMulticloudDataTransferSupportedService(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a service that is supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetMulticloudDataTransferSupportedServiceRequest request =
+ * GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferSupportedServiceName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
+ * .toString())
+ * .build();
+ * MulticloudDataTransferSupportedService response =
+ * dataTransferServiceClient.getMulticloudDataTransferSupportedService(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 MulticloudDataTransferSupportedService getMulticloudDataTransferSupportedService(
+ GetMulticloudDataTransferSupportedServiceRequest request) {
+ return getMulticloudDataTransferSupportedServiceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the details of a service that is supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetMulticloudDataTransferSupportedServiceRequest request =
+ * GetMulticloudDataTransferSupportedServiceRequest.newBuilder()
+ * .setName(
+ * MulticloudDataTransferSupportedServiceName.of(
+ * "[PROJECT]", "[LOCATION]", "[MULTICLOUD_DATA_TRANSFER_SUPPORTED_SERVICE]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .getMulticloudDataTransferSupportedServiceCallable()
+ * .futureCall(request);
+ * // Do something.
+ * MulticloudDataTransferSupportedService response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ GetMulticloudDataTransferSupportedServiceRequest, MulticloudDataTransferSupportedService>
+ getMulticloudDataTransferSupportedServiceCallable() {
+ return stub.getMulticloudDataTransferSupportedServiceCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (MulticloudDataTransferSupportedService element :
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferSupportedServices(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMulticloudDataTransferSupportedServicesPagedResponse
+ listMulticloudDataTransferSupportedServices(LocationName parent) {
+ ListMulticloudDataTransferSupportedServicesRequest request =
+ ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listMulticloudDataTransferSupportedServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (MulticloudDataTransferSupportedService element :
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferSupportedServices(parent)
+ * .iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListMulticloudDataTransferSupportedServicesPagedResponse
+ listMulticloudDataTransferSupportedServices(String parent) {
+ ListMulticloudDataTransferSupportedServicesRequest request =
+ ListMulticloudDataTransferSupportedServicesRequest.newBuilder().setParent(parent).build();
+ return listMulticloudDataTransferSupportedServices(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferSupportedServicesRequest request =
+ * ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (MulticloudDataTransferSupportedService element :
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferSupportedServices(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 ListMulticloudDataTransferSupportedServicesPagedResponse
+ listMulticloudDataTransferSupportedServices(
+ ListMulticloudDataTransferSupportedServicesRequest request) {
+ return listMulticloudDataTransferSupportedServicesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferSupportedServicesRequest request =
+ * ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferSupportedServicesPagedCallable()
+ * .futureCall(request);
+ * // Do something.
+ * for (MulticloudDataTransferSupportedService element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListMulticloudDataTransferSupportedServicesRequest,
+ ListMulticloudDataTransferSupportedServicesPagedResponse>
+ listMulticloudDataTransferSupportedServicesPagedCallable() {
+ return stub.listMulticloudDataTransferSupportedServicesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the services in the project for a region that are supported for Data Transfer Essentials.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListMulticloudDataTransferSupportedServicesRequest request =
+ * ListMulticloudDataTransferSupportedServicesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListMulticloudDataTransferSupportedServicesResponse response =
+ * dataTransferServiceClient
+ * .listMulticloudDataTransferSupportedServicesCallable()
+ * .call(request);
+ * for (MulticloudDataTransferSupportedService element :
+ * response.getMulticloudDataTransferSupportedServicesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListMulticloudDataTransferSupportedServicesRequest,
+ ListMulticloudDataTransferSupportedServicesResponse>
+ listMulticloudDataTransferSupportedServicesCallable() {
+ return stub.listMulticloudDataTransferSupportedServicesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.This method can be called in
+ * two ways:
+ *
+ * * **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : dataTransferServiceClient.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.This method can be called in
+ * two ways:
+ *
+ * * **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable* **List all public locations:** Use the path `GET /v1/locations`.* + * **List project-visible locations:** Use the path`GET + * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or + * other locations specifically visibleto the 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * dataTransferServiceClient.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 UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = dataTransferServiceClient.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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * dataTransferServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = dataTransferServiceClient.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.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *
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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = dataTransferServiceClient.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.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableNote: 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = dataTransferServiceClient.testIamPermissions(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 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.
+ *
+ * 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 (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(GroupName.of("[PROJECT]", "[HUB]", "[GROUP]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * dataTransferServiceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe 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 + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getMulticloudDataTransferConfig: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
+ * DataTransferServiceSettings.newBuilder();
+ * dataTransferServiceSettingsBuilder
+ * .getMulticloudDataTransferConfigSettings()
+ * .setRetrySettings(
+ * dataTransferServiceSettingsBuilder
+ * .getMulticloudDataTransferConfigSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ * dataTransferServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createMulticloudDataTransferConfig: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
+ * DataTransferServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * dataTransferServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class DataTransferServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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:
+ *
+ * Note: close() needs to be called on the HubServiceClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * ListHubs Lists the Network Connectivity Center hubs associated with a given project. Request object method variants only take one parameter, a request object, which must be constructed before the call. listHubs(ListHubsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listHubs(LocationName parent)
+ * listHubs(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listHubsPagedCallable()
+ * listHubsCallable()
+ * GetHub Gets details about a Network Connectivity Center hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. getHub(GetHubRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getHub(HubName name)
+ * getHub(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getHubCallable()
+ * CreateHub Creates a new Network Connectivity Center hub in the specified project. Request object method variants only take one parameter, a request object, which must be constructed before the call. createHubAsync(CreateHubRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createHubAsync(LocationName parent, Hub hub, String hubId)
+ * createHubAsync(String parent, Hub hub, String hubId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createHubOperationCallable()
+ * createHubCallable()
+ * UpdateHub Updates the description and/or labels of a Network Connectivity Center hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateHubAsync(UpdateHubRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateHubAsync(Hub hub, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateHubOperationCallable()
+ * updateHubCallable()
+ * DeleteHub Deletes a Network Connectivity Center hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteHubAsync(DeleteHubRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteHubAsync(HubName name)
+ * deleteHubAsync(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteHubOperationCallable()
+ * deleteHubCallable()
+ * ListHubSpokes Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted. Request object method variants only take one parameter, a request object, which must be constructed before the call. listHubSpokes(ListHubSpokesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listHubSpokes(HubName name)
+ * listHubSpokes(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listHubSpokesPagedCallable()
+ * listHubSpokesCallable()
+ * QueryHubStatus Query the Private Service Connect propagation status of a Network Connectivity Center hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. queryHubStatus(QueryHubStatusRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. queryHubStatus(HubName name)
+ * queryHubStatus(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. queryHubStatusPagedCallable()
+ * queryHubStatusCallable()
+ * ListSpokes Lists the Network Connectivity Center spokes in a specified project and location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listSpokes(ListSpokesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listSpokes(LocationName parent)
+ * listSpokes(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listSpokesPagedCallable()
+ * listSpokesCallable()
+ * GetSpoke Gets details about a Network Connectivity Center spoke. Request object method variants only take one parameter, a request object, which must be constructed before the call. getSpoke(GetSpokeRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getSpoke(SpokeName name)
+ * getSpoke(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getSpokeCallable()
+ * CreateSpoke Creates a Network Connectivity Center spoke. Request object method variants only take one parameter, a request object, which must be constructed before the call. createSpokeAsync(CreateSpokeRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createSpokeAsync(LocationName parent, Spoke spoke, String spokeId)
+ * createSpokeAsync(String parent, Spoke spoke, String spokeId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createSpokeOperationCallable()
+ * createSpokeCallable()
+ * UpdateSpoke Updates the parameters of a Network Connectivity Center spoke. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateSpokeAsync(UpdateSpokeRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateSpokeAsync(Spoke spoke, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateSpokeOperationCallable()
+ * updateSpokeCallable()
+ * RejectHubSpoke Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. rejectHubSpokeAsync(RejectHubSpokeRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. rejectHubSpokeAsync(HubName name, SpokeName spokeUri)
+ * rejectHubSpokeAsync(HubName name, String spokeUri)
+ * rejectHubSpokeAsync(String name, SpokeName spokeUri)
+ * rejectHubSpokeAsync(String name, String spokeUri)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rejectHubSpokeOperationCallable()
+ * rejectHubSpokeCallable()
+ * AcceptHubSpoke Accepts a proposal to attach a Network Connectivity Center spoke to a hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. acceptHubSpokeAsync(AcceptHubSpokeRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. acceptHubSpokeAsync(HubName name, SpokeName spokeUri)
+ * acceptHubSpokeAsync(HubName name, String spokeUri)
+ * acceptHubSpokeAsync(String name, SpokeName spokeUri)
+ * acceptHubSpokeAsync(String name, String spokeUri)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. acceptHubSpokeOperationCallable()
+ * acceptHubSpokeCallable()
+ * AcceptSpokeUpdate Accepts a proposal to update a Network Connectivity Center spoke in a hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. acceptSpokeUpdateAsync(AcceptSpokeUpdateRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. acceptSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag)
+ * acceptSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag)
+ * acceptSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag)
+ * acceptSpokeUpdateAsync(String name, String spokeUri, String spokeEtag)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. acceptSpokeUpdateOperationCallable()
+ * acceptSpokeUpdateCallable()
+ * RejectSpokeUpdate Rejects a proposal to update a Network Connectivity Center spoke in a hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. rejectSpokeUpdateAsync(RejectSpokeUpdateRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. rejectSpokeUpdateAsync(HubName name, SpokeName spokeUri, String spokeEtag)
+ * rejectSpokeUpdateAsync(HubName name, String spokeUri, String spokeEtag)
+ * rejectSpokeUpdateAsync(String name, SpokeName spokeUri, String spokeEtag)
+ * rejectSpokeUpdateAsync(String name, String spokeUri, String spokeEtag)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. rejectSpokeUpdateOperationCallable()
+ * rejectSpokeUpdateCallable()
+ * DeleteSpoke Deletes a Network Connectivity Center spoke. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteSpokeAsync(DeleteSpokeRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteSpokeAsync(SpokeName name)
+ * deleteSpokeAsync(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteSpokeOperationCallable()
+ * deleteSpokeCallable()
+ * GetRouteTable Gets details about a Network Connectivity Center route table. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRouteTable(GetRouteTableRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRouteTable(RouteTableName name)
+ * getRouteTable(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRouteTableCallable()
+ * GetRoute Gets details about the specified route. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRoute(GetRouteRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRoute(HubRouteName name)
+ * getRoute(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRouteCallable()
+ * ListRoutes Lists routes in a given route table. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRoutes(ListRoutesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRoutes(RouteTableName parent)
+ * listRoutes(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRoutesPagedCallable()
+ * listRoutesCallable()
+ * ListRouteTables Lists route tables in a given hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRouteTables(ListRouteTablesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRouteTables(HubName parent)
+ * listRouteTables(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRouteTablesPagedCallable()
+ * listRouteTablesCallable()
+ * GetGroup Gets details about a Network Connectivity Center group. Request object method variants only take one parameter, a request object, which must be constructed before the call. getGroup(GetGroupRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getGroup(GroupName name)
+ * getGroup(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getGroupCallable()
+ * ListGroups Lists groups in a given hub. Request object method variants only take one parameter, a request object, which must be constructed before the call. listGroups(ListGroupsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listGroups(HubName parent)
+ * listGroups(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listGroupsPagedCallable()
+ * listGroupsCallable()
+ * UpdateGroup Updates the parameters of a Network Connectivity Center group. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateGroupAsync(UpdateGroupRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateGroupAsync(Group group, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateGroupOperationCallable()
+ * updateGroupCallable()
+ * CreateGatewayAdvertisedRoute Create a GatewayAdvertisedRoute Request object method variants only take one parameter, a request object, which must be constructed before the call. createGatewayAdvertisedRouteAsync(CreateGatewayAdvertisedRouteRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. createGatewayAdvertisedRouteAsync(SpokeName parent, GatewayAdvertisedRoute gatewayAdvertisedRoute, String gatewayAdvertisedRouteId)
+ * createGatewayAdvertisedRouteAsync(String parent, GatewayAdvertisedRoute gatewayAdvertisedRoute, String gatewayAdvertisedRouteId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createGatewayAdvertisedRouteOperationCallable()
+ * createGatewayAdvertisedRouteCallable()
+ * GetGatewayAdvertisedRoute Get a GatewayAdvertisedRoute Request object method variants only take one parameter, a request object, which must be constructed before the call. getGatewayAdvertisedRoute(GetGatewayAdvertisedRouteRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getGatewayAdvertisedRoute(GatewayAdvertisedRouteName name)
+ * getGatewayAdvertisedRoute(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getGatewayAdvertisedRouteCallable()
+ * ListGatewayAdvertisedRoutes List GatewayAdvertisedRoutes Request object method variants only take one parameter, a request object, which must be constructed before the call. listGatewayAdvertisedRoutes(ListGatewayAdvertisedRoutesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listGatewayAdvertisedRoutes(SpokeName parent)
+ * listGatewayAdvertisedRoutes(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listGatewayAdvertisedRoutesPagedCallable()
+ * listGatewayAdvertisedRoutesCallable()
+ * UpdateGatewayAdvertisedRoute Update a GatewayAdvertisedRoute Request object method variants only take one parameter, a request object, which must be constructed before the call. updateGatewayAdvertisedRouteAsync(UpdateGatewayAdvertisedRouteRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateGatewayAdvertisedRouteAsync(GatewayAdvertisedRoute gatewayAdvertisedRoute, FieldMask updateMask)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateGatewayAdvertisedRouteOperationCallable()
+ * updateGatewayAdvertisedRouteCallable()
+ * DeleteGatewayAdvertisedRoute Delete a GatewayAdvertisedRoute Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteGatewayAdvertisedRouteAsync(DeleteGatewayAdvertisedRouteRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. deleteGatewayAdvertisedRouteAsync(GatewayAdvertisedRouteName name)
+ * deleteGatewayAdvertisedRouteAsync(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteGatewayAdvertisedRouteOperationCallable()
+ * deleteGatewayAdvertisedRouteCallable()
+ * ListLocations Lists information about the supported locations for this service.This method can be called in two ways:
+ * * **List all public locations:** Use the path `GET /v1/locations`.* **List project-visible locations:** Use the path`GET /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or other locations specifically visibleto the project. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
+ * listLocationsCallable()
+ * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
+ * SetIamPolicy Sets the access control policy on the specified resource. Replacesany existing policy.
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
+ * GetIamPolicy Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
+ * TestIamPermissions Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of HubServiceSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class HubServiceClient implements BackgroundResource {
+ private final HubServiceSettings settings;
+ private final HubServiceStub stub;
+ private final OperationsClient operationsClient;
+
+ /** Constructs an instance of HubServiceClient with default settings. */
+ public static final HubServiceClient create() throws IOException {
+ return create(HubServiceSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of HubServiceClient, using the given settings. The channels are created
+ * based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final HubServiceClient create(HubServiceSettings settings) throws IOException {
+ return new HubServiceClient(settings);
+ }
+
+ /**
+ * Constructs an instance of HubServiceClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(HubServiceSettings).
+ */
+ public static final HubServiceClient create(HubServiceStub stub) {
+ return new HubServiceClient(stub);
+ }
+
+ /**
+ * Constructs an instance of HubServiceClient, using the given settings. This is protected so that
+ * it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected HubServiceClient(HubServiceSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((HubServiceStubSettings) settings.getStubSettings()).createStub();
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ protected HubServiceClient(HubServiceStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ }
+
+ public final HubServiceSettings getSettings() {
+ return settings;
+ }
+
+ public HubServiceStub 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 OperationsClient getOperationsClient() {
+ return operationsClient;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center hubs associated with a given project.
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * The gateway advertised route's `name` field is used to identify the gateway advertised
+ * route to update. Format:
+ * `projects/{project}/locations/{location}/spokes/{spoke}/gatewayAdvertisedRoutes/{gatewayAdvertisedRoute}`
+ * @param updateMask Optional. In the case of an update to an existing group, field mask is used
+ * to specify the fields to be overwritten. The fields specified in the update_mask are
+ * relative to the resource, not the full request. A field is overwritten if it is in the
+ * mask. If the user does not provide a mask, then all fields are overwritten.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * * **List all public locations:** Use the path `GET /v1/locations`.*
+ * **List project-visible locations:** Use the path`GET
+ * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or
+ * other locations specifically visibleto the project.
+ *
+ * Sample code:
+ *
+ * * **List all public locations:** Use the path `GET /v1/locations`.*
+ * **List project-visible locations:** Use the path`GET
+ * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or
+ * other locations specifically visibleto the project.
+ *
+ * Sample code:
+ *
+ * * **List all public locations:** Use the path `GET /v1/locations`.*
+ * **List project-visible locations:** Use the path`GET
+ * /v1/projects/{project_id}/locations`. This may include publiclocations as well as private or
+ * other locations specifically visibleto the project.
+ *
+ * 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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * Hub response = hubServiceClient.getHub(name);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceSettings hubServiceSettings =
+ * HubServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HubServiceSettings hubServiceSettings =
+ * HubServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HubServiceClient hubServiceClient = HubServiceClient.create(hubServiceSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Hub element : hubServiceClient.listHubs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource's name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListHubsPagedResponse listHubs(LocationName parent) {
+ ListHubsRequest request =
+ ListHubsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listHubs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center hubs associated with 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 = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Hub element : hubServiceClient.listHubs(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 ListHubsPagedResponse listHubs(String parent) {
+ ListHubsRequest request = ListHubsRequest.newBuilder().setParent(parent).build();
+ return listHubs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center hubs associated with 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()) {
+ * ListHubsRequest request =
+ * ListHubsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Hub element : hubServiceClient.listHubs(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListHubsPagedResponse listHubs(ListHubsRequest request) {
+ return listHubsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center hubs associated with 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()) {
+ * ListHubsRequest request =
+ * ListHubsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").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()) {
+ * ListHubsRequest request =
+ * ListHubsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListHubsResponse response = hubServiceClient.listHubsCallable().call(request);
+ * for (Hub element : response.getHubsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ 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 name = HubName.of("[PROJECT]", "[HUB]");
+ * Hub response = hubServiceClient.getHub(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Hub getHub(HubName name) {
+ GetHubRequest request =
+ GetHubRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getHub(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center 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 name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * Hub response = hubServiceClient.getHub(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub resource to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Hub getHub(String name) {
+ GetHubRequest request = GetHubRequest.newBuilder().setName(name).build();
+ return getHub(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center 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()) {
+ * GetHubRequest request =
+ * GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").toString()).build();
+ * Hub response = hubServiceClient.getHub(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 Hub getHub(GetHubRequest request) {
+ return getHubCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center 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()) {
+ * GetHubRequest request =
+ * GetHubRequest.newBuilder().setName(HubName.of("[PROJECT]", "[HUB]").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()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Hub hub = Hub.newBuilder().build();
+ * String hubId = "hubId99628272";
+ * Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param hub Required. The initial values for a new hub.
+ * @param hubId Required. A unique identifier for 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 parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Hub hub = Hub.newBuilder().build();
+ * String hubId = "hubId99628272";
+ * Hub response = hubServiceClient.createHubAsync(parent, hub, hubId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param hub Required. The initial values for a new hub.
+ * @param hubId Required. A unique identifier for 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()) {
+ * CreateHubRequest request =
+ * CreateHubRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHubId("hubId99628272")
+ * .setHub(Hub.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Hub response = hubServiceClient.createHubAsync(request).get();
+ * }
+ * }
+ *
+ * @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()) {
+ * CreateHubRequest request =
+ * CreateHubRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHubId("hubId99628272")
+ * .setHub(Hub.newBuilder().build())
+ * .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()) {
+ * CreateHubRequest request =
+ * CreateHubRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setHubId("hubId99628272")
+ * .setHub(Hub.newBuilder().build())
+ * .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()) {
+ * Hub hub = Hub.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Hub response = hubServiceClient.updateHubAsync(hub, updateMask).get();
+ * }
+ * }
+ *
+ * @param hub Required. The state that the hub should be in after the update.
+ * @param updateMask Optional. In the case of an update to an existing hub, field mask is used to
+ * specify the fields to be overwritten. The fields specified in the update_mask are relative
+ * to the resource, not the full request. A field is overwritten if it is in the mask. If the
+ * user does not provide a mask, then all fields are overwritten.
+ * @throws 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()) {
+ * UpdateHubRequest request =
+ * UpdateHubRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHub(Hub.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Hub response = hubServiceClient.updateHubAsync(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()) {
+ * UpdateHubRequest request =
+ * UpdateHubRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHub(Hub.newBuilder().build())
+ * .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()) {
+ * UpdateHubRequest request =
+ * UpdateHubRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setHub(Hub.newBuilder().build())
+ * .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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * hubServiceClient.deleteHubAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub 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 = HubName.of("[PROJECT]", "[HUB]").toString();
+ * hubServiceClient.deleteHubAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub 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()) {
+ * DeleteHubRequest request =
+ * DeleteHubRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * hubServiceClient.deleteHubAsync(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()) {
+ * DeleteHubRequest request =
+ * DeleteHubRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").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()) {
+ * DeleteHubRequest request =
+ * DeleteHubRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").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()) {
+ * 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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * for (HubStatusEntry element : hubServiceClient.queryHubStatus(name).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final QueryHubStatusPagedResponse queryHubStatus(HubName name) {
+ QueryHubStatusRequest request =
+ QueryHubStatusRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return queryHubStatus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Query the Private Service Connect propagation status of a Network Connectivity Center 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 name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * for (HubStatusEntry element : hubServiceClient.queryHubStatus(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 QueryHubStatusPagedResponse queryHubStatus(String name) {
+ QueryHubStatusRequest request = QueryHubStatusRequest.newBuilder().setName(name).build();
+ return queryHubStatus(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Query the Private Service Connect propagation status of a Network Connectivity Center 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()) {
+ * QueryHubStatusRequest request =
+ * QueryHubStatusRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setGroupBy("groupBy293428022")
+ * .build();
+ * for (HubStatusEntry element : hubServiceClient.queryHubStatus(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 QueryHubStatusPagedResponse queryHubStatus(QueryHubStatusRequest request) {
+ return queryHubStatusPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Query the Private Service Connect propagation status of a Network Connectivity Center 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()) {
+ * QueryHubStatusRequest request =
+ * QueryHubStatusRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setGroupBy("groupBy293428022")
+ * .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()) {
+ * QueryHubStatusRequest request =
+ * QueryHubStatusRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .setGroupBy("groupBy293428022")
+ * .build();
+ * while (true) {
+ * QueryHubStatusResponse response = hubServiceClient.queryHubStatusCallable().call(request);
+ * for (HubStatusEntry element : response.getHubStatusEntriesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ 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()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSpokesPagedResponse listSpokes(LocationName parent) {
+ ListSpokesRequest request =
+ ListSpokesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
+ return listSpokes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center spokes in a specified project and 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()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Spoke element : hubServiceClient.listSpokes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSpokesPagedResponse listSpokes(String parent) {
+ ListSpokesRequest request = ListSpokesRequest.newBuilder().setParent(parent).build();
+ return listSpokes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center spokes in a specified project and 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()) {
+ * ListSpokesRequest request =
+ * ListSpokesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Spoke element : hubServiceClient.listSpokes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListSpokesPagedResponse listSpokes(ListSpokesRequest request) {
+ return listSpokesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists the Network Connectivity Center spokes in a specified project and 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()) {
+ * ListSpokesRequest request =
+ * ListSpokesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").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()) {
+ * ListSpokesRequest request =
+ * ListSpokesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListSpokesResponse response = hubServiceClient.listSpokesCallable().call(request);
+ * for (Spoke element : response.getSpokesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ 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]");
+ * Spoke response = hubServiceClient.getSpoke(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the spoke resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Spoke getSpoke(SpokeName name) {
+ GetSpokeRequest request =
+ GetSpokeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getSpoke(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center spoke.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * String name = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * Spoke response = hubServiceClient.getSpoke(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the spoke resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Spoke getSpoke(String name) {
+ GetSpokeRequest request = GetSpokeRequest.newBuilder().setName(name).build();
+ return getSpoke(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center spoke.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetSpokeRequest request =
+ * GetSpokeRequest.newBuilder()
+ * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .build();
+ * Spoke response = hubServiceClient.getSpoke(request);
+ * }
+ * }
+ *
+ * @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 Spoke getSpoke(GetSpokeRequest request) {
+ return getSpokeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details about a Network Connectivity Center spoke.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HubServiceClient hubServiceClient = HubServiceClient.create()) {
+ * GetSpokeRequest request =
+ * GetSpokeRequest.newBuilder()
+ * .setName(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .build();
+ * ApiFuture
+ */
+ 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()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Spoke spoke = Spoke.newBuilder().build();
+ * String spokeId = "spokeId-1998996281";
+ * Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param spoke Required. The initial values for a new spoke.
+ * @param spokeId Required. Unique id for the spoke to create.
+ * @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 parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Spoke spoke = Spoke.newBuilder().build();
+ * String spokeId = "spokeId-1998996281";
+ * Spoke response = hubServiceClient.createSpokeAsync(parent, spoke, spokeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param spoke Required. The initial values for a new spoke.
+ * @param spokeId Required. Unique id for the spoke to create.
+ * @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()) {
+ * CreateSpokeRequest request =
+ * CreateSpokeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSpokeId("spokeId-1998996281")
+ * .setSpoke(Spoke.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Spoke response = hubServiceClient.createSpokeAsync(request).get();
+ * }
+ * }
+ *
+ * @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()) {
+ * CreateSpokeRequest request =
+ * CreateSpokeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSpokeId("spokeId-1998996281")
+ * .setSpoke(Spoke.newBuilder().build())
+ * .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()) {
+ * CreateSpokeRequest request =
+ * CreateSpokeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setSpokeId("spokeId-1998996281")
+ * .setSpoke(Spoke.newBuilder().build())
+ * .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()) {
+ * Spoke spoke = Spoke.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Spoke response = hubServiceClient.updateSpokeAsync(spoke, updateMask).get();
+ * }
+ * }
+ *
+ * @param spoke Required. The state that the spoke should be in after the update.
+ * @param updateMask Optional. In the case of an update to an existing spoke, field mask is used
+ * to specify the fields to be overwritten. The fields specified in the update_mask are
+ * relative to the resource, not the full request. A field is overwritten if it is in the
+ * mask. If the user does not provide a mask, then all fields are overwritten.
+ * @throws 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()) {
+ * UpdateSpokeRequest request =
+ * UpdateSpokeRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSpoke(Spoke.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Spoke response = hubServiceClient.updateSpokeAsync(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()) {
+ * UpdateSpokeRequest request =
+ * UpdateSpokeRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSpoke(Spoke.newBuilder().build())
+ * .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()) {
+ * UpdateSpokeRequest request =
+ * UpdateSpokeRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setSpoke(Spoke.newBuilder().build())
+ * .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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * 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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * 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()) {
+ * String name = HubName.of("[PROJECT]", "[HUB]").toString();
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * 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()) {
+ * 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();
+ * 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()) {
+ * RejectHubSpokeRequest request =
+ * RejectHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .setDetails("details1557721666")
+ * .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()) {
+ * RejectHubSpokeRequest request =
+ * RejectHubSpokeRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setRequestId("requestId693933066")
+ * .setDetails("details1557721666")
+ * .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 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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * String spokeEtag = "spokeEtag-1185145407";
+ * AcceptSpokeUpdateResponse response =
+ * hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to accept spoke update.
+ * @param spokeUri Required. The URI of the spoke to accept update.
+ * @param spokeEtag Required. The etag of the spoke to accept update.
+ * @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();
+ * String spokeEtag = "spokeEtag-1185145407";
+ * AcceptSpokeUpdateResponse response =
+ * hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to accept spoke update.
+ * @param spokeUri Required. The URI of the spoke to accept update.
+ * @param spokeEtag Required. The etag of the spoke to accept update.
+ * @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]");
+ * String spokeEtag = "spokeEtag-1185145407";
+ * AcceptSpokeUpdateResponse response =
+ * hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to accept spoke update.
+ * @param spokeUri Required. The URI of the spoke to accept update.
+ * @param spokeEtag Required. The etag of the spoke to accept update.
+ * @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();
+ * String spokeEtag = "spokeEtag-1185145407";
+ * AcceptSpokeUpdateResponse response =
+ * hubServiceClient.acceptSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to accept spoke update.
+ * @param spokeUri Required. The URI of the spoke to accept update.
+ * @param spokeEtag Required. The etag of the spoke to accept update.
+ * @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()) {
+ * AcceptSpokeUpdateRequest request =
+ * AcceptSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * AcceptSpokeUpdateResponse response = hubServiceClient.acceptSpokeUpdateAsync(request).get();
+ * }
+ * }
+ *
+ * @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()) {
+ * AcceptSpokeUpdateRequest request =
+ * AcceptSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ AcceptSpokeUpdateRequest, AcceptSpokeUpdateResponse, OperationMetadata>
+ acceptSpokeUpdateOperationCallable() {
+ return stub.acceptSpokeUpdateOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Accepts a proposal to update a Network Connectivity Center spoke in a 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()) {
+ * AcceptSpokeUpdateRequest request =
+ * AcceptSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .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()) {
+ * HubName name = HubName.of("[PROJECT]", "[HUB]");
+ * SpokeName spokeUri = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * String spokeEtag = "spokeEtag-1185145407";
+ * RejectSpokeUpdateResponse response =
+ * hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to reject spoke update.
+ * @param spokeUri Required. The URI of the spoke to reject update.
+ * @param spokeEtag Required. The etag of the spoke to reject update.
+ * @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();
+ * String spokeEtag = "spokeEtag-1185145407";
+ * RejectSpokeUpdateResponse response =
+ * hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to reject spoke update.
+ * @param spokeUri Required. The URI of the spoke to reject update.
+ * @param spokeEtag Required. The etag of the spoke to reject update.
+ * @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]");
+ * String spokeEtag = "spokeEtag-1185145407";
+ * RejectSpokeUpdateResponse response =
+ * hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to reject spoke update.
+ * @param spokeUri Required. The URI of the spoke to reject update.
+ * @param spokeEtag Required. The etag of the spoke to reject update.
+ * @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();
+ * String spokeEtag = "spokeEtag-1185145407";
+ * RejectSpokeUpdateResponse response =
+ * hubServiceClient.rejectSpokeUpdateAsync(name, spokeUri, spokeEtag).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the hub to reject spoke update.
+ * @param spokeUri Required. The URI of the spoke to reject update.
+ * @param spokeEtag Required. The etag of the spoke to reject update.
+ * @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()) {
+ * RejectSpokeUpdateRequest request =
+ * RejectSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .setDetails("details1557721666")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * RejectSpokeUpdateResponse response = hubServiceClient.rejectSpokeUpdateAsync(request).get();
+ * }
+ * }
+ *
+ * @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()) {
+ * RejectSpokeUpdateRequest request =
+ * RejectSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .setDetails("details1557721666")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ RejectSpokeUpdateRequest, RejectSpokeUpdateResponse, OperationMetadata>
+ rejectSpokeUpdateOperationCallable() {
+ return stub.rejectSpokeUpdateOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Rejects a proposal to update a Network Connectivity Center spoke in a 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()) {
+ * RejectSpokeUpdateRequest request =
+ * RejectSpokeUpdateRequest.newBuilder()
+ * .setName(HubName.of("[PROJECT]", "[HUB]").toString())
+ * .setSpokeUri(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setSpokeEtag("spokeEtag-1185145407")
+ * .setDetails("details1557721666")
+ * .setRequestId("requestId693933066")
+ * .build();
+ * ApiFuture
+ */
+ 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 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 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 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()) {
+ * 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 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()) {
+ * 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 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 (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 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()) {
+ * 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 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()) {
+ * 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()) {
+ * Group group = Group.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Group response = hubServiceClient.updateGroupAsync(group, updateMask).get();
+ * }
+ * }
+ *
+ * @param group Required. The state that the group should be in after the update.
+ * @param updateMask Optional. In the case of an update to an existing group, field mask is used
+ * to specify the fields to be overwritten. The fields specified in the update_mask are
+ * relative to the resource, not the full request. A field is overwritten if it is in the
+ * mask. If the user does not provide a mask, then all fields are overwritten.
+ * @throws 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()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * Group response = hubServiceClient.updateGroupAsync(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()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .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()) {
+ * UpdateGroupRequest request =
+ * UpdateGroupRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGroup(Group.newBuilder().build())
+ * .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 parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build();
+ * String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339";
+ * GatewayAdvertisedRoute response =
+ * hubServiceClient
+ * .createGatewayAdvertisedRouteAsync(
+ * parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param gatewayAdvertisedRoute Required. Initial values for the new gateway advertised route.
+ * @param gatewayAdvertisedRouteId Required. Unique id for the route to create.
+ * @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 parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build();
+ * String gatewayAdvertisedRouteId = "gatewayAdvertisedRouteId1531070339";
+ * GatewayAdvertisedRoute response =
+ * hubServiceClient
+ * .createGatewayAdvertisedRouteAsync(
+ * parent, gatewayAdvertisedRoute, gatewayAdvertisedRouteId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource.
+ * @param gatewayAdvertisedRoute Required. Initial values for the new gateway advertised route.
+ * @param gatewayAdvertisedRouteId Required. Unique id for the route to create.
+ * @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()) {
+ * CreateGatewayAdvertisedRouteRequest request =
+ * CreateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339")
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * GatewayAdvertisedRoute response =
+ * hubServiceClient.createGatewayAdvertisedRouteAsync(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()) {
+ * CreateGatewayAdvertisedRouteRequest request =
+ * CreateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339")
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata>
+ createGatewayAdvertisedRouteOperationCallable() {
+ return stub.createGatewayAdvertisedRouteOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * CreateGatewayAdvertisedRouteRequest request =
+ * CreateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setGatewayAdvertisedRouteId("gatewayAdvertisedRouteId1531070339")
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .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()) {
+ * GatewayAdvertisedRouteName name =
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]");
+ * GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the gateway advertised route to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GatewayAdvertisedRoute getGatewayAdvertisedRoute(GatewayAdvertisedRouteName name) {
+ GetGatewayAdvertisedRouteRequest request =
+ GetGatewayAdvertisedRouteRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGatewayAdvertisedRoute(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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 =
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .toString();
+ * GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the gateway advertised route to get.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GatewayAdvertisedRoute getGatewayAdvertisedRoute(String name) {
+ GetGatewayAdvertisedRouteRequest request =
+ GetGatewayAdvertisedRouteRequest.newBuilder().setName(name).build();
+ return getGatewayAdvertisedRoute(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * GetGatewayAdvertisedRouteRequest request =
+ * GetGatewayAdvertisedRouteRequest.newBuilder()
+ * .setName(
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .toString())
+ * .build();
+ * GatewayAdvertisedRoute response = hubServiceClient.getGatewayAdvertisedRoute(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 GatewayAdvertisedRoute getGatewayAdvertisedRoute(
+ GetGatewayAdvertisedRouteRequest request) {
+ return getGatewayAdvertisedRouteCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * GetGatewayAdvertisedRouteRequest request =
+ * GetGatewayAdvertisedRouteRequest.newBuilder()
+ * .setName(
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_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()) {
+ * SpokeName parent = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]");
+ * for (GatewayAdvertisedRoute element :
+ * hubServiceClient.listGatewayAdvertisedRoutes(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 ListGatewayAdvertisedRoutesPagedResponse listGatewayAdvertisedRoutes(
+ SpokeName parent) {
+ ListGatewayAdvertisedRoutesRequest request =
+ ListGatewayAdvertisedRoutesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGatewayAdvertisedRoutes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List GatewayAdvertisedRoutes
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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 = SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString();
+ * for (GatewayAdvertisedRoute element :
+ * hubServiceClient.listGatewayAdvertisedRoutes(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 ListGatewayAdvertisedRoutesPagedResponse listGatewayAdvertisedRoutes(String parent) {
+ ListGatewayAdvertisedRoutesRequest request =
+ ListGatewayAdvertisedRoutesRequest.newBuilder().setParent(parent).build();
+ return listGatewayAdvertisedRoutes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List GatewayAdvertisedRoutes
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * ListGatewayAdvertisedRoutesRequest request =
+ * ListGatewayAdvertisedRoutesRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (GatewayAdvertisedRoute element :
+ * hubServiceClient.listGatewayAdvertisedRoutes(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 ListGatewayAdvertisedRoutesPagedResponse listGatewayAdvertisedRoutes(
+ ListGatewayAdvertisedRoutesRequest request) {
+ return listGatewayAdvertisedRoutesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List GatewayAdvertisedRoutes
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * ListGatewayAdvertisedRoutesRequest request =
+ * ListGatewayAdvertisedRoutesRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable<
+ ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesPagedResponse>
+ listGatewayAdvertisedRoutesPagedCallable() {
+ return stub.listGatewayAdvertisedRoutesPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * List GatewayAdvertisedRoutes
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * ListGatewayAdvertisedRoutesRequest request =
+ * ListGatewayAdvertisedRoutesRequest.newBuilder()
+ * .setParent(SpokeName.of("[PROJECT]", "[LOCATION]", "[SPOKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGatewayAdvertisedRoutesResponse response =
+ * hubServiceClient.listGatewayAdvertisedRoutesCallable().call(request);
+ * for (GatewayAdvertisedRoute element : response.getGatewayAdvertisedRoutesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListGatewayAdvertisedRoutesRequest, ListGatewayAdvertisedRoutesResponse>
+ listGatewayAdvertisedRoutesCallable() {
+ return stub.listGatewayAdvertisedRoutesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * GatewayAdvertisedRoute gatewayAdvertisedRoute = GatewayAdvertisedRoute.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GatewayAdvertisedRoute response =
+ * hubServiceClient
+ * .updateGatewayAdvertisedRouteAsync(gatewayAdvertisedRoute, updateMask)
+ * .get();
+ * }
+ * }
+ *
+ * @param gatewayAdvertisedRoute Required. The gateway advertised route to update.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * UpdateGatewayAdvertisedRouteRequest request =
+ * UpdateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * GatewayAdvertisedRoute response =
+ * hubServiceClient.updateGatewayAdvertisedRouteAsync(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()) {
+ * UpdateGatewayAdvertisedRouteRequest request =
+ * UpdateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ UpdateGatewayAdvertisedRouteRequest, GatewayAdvertisedRoute, OperationMetadata>
+ updateGatewayAdvertisedRouteOperationCallable() {
+ return stub.updateGatewayAdvertisedRouteOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a GatewayAdvertisedRoute
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()) {
+ * UpdateGatewayAdvertisedRouteRequest request =
+ * UpdateGatewayAdvertisedRouteRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setGatewayAdvertisedRoute(GatewayAdvertisedRoute.newBuilder().build())
+ * .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()) {
+ * GatewayAdvertisedRouteName name =
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]");
+ * hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the gateway advertised route 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 =
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .toString();
+ * hubServiceClient.deleteGatewayAdvertisedRouteAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the gateway advertised route 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()) {
+ * DeleteGatewayAdvertisedRouteRequest request =
+ * DeleteGatewayAdvertisedRouteRequest.newBuilder()
+ * .setName(
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .build();
+ * hubServiceClient.deleteGatewayAdvertisedRouteAsync(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()) {
+ * DeleteGatewayAdvertisedRouteRequest request =
+ * DeleteGatewayAdvertisedRouteRequest.newBuilder()
+ * .setName(
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .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()) {
+ * DeleteGatewayAdvertisedRouteRequest request =
+ * DeleteGatewayAdvertisedRouteRequest.newBuilder()
+ * .setName(
+ * GatewayAdvertisedRouteName.of(
+ * "[PROJECT]", "[LOCATION]", "[SPOKE]", "[GATEWAY_ADVERTISED_ROUTE]")
+ * .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()) {
+ * 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.This method can be called in
+ * two ways:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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