diff --git a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java b/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java deleted file mode 100644 index cfdfd69a4b5c..000000000000 --- a/java-dataproc-metastore/google-cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java +++ /dev/null @@ -1,2790 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.metastore.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.metastore.v1.stub.DataprocMetastoreStub; -import com.google.cloud.metastore.v1.stub.DataprocMetastoreStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Configures and manages metastore services. Metastore services are fully - * managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata - * management software. Each metastore service exposes a network endpoint through which metadata - * queries are served. Metadata queries can originate from a variety of sources, including Apache - * Hive, Apache Presto, and Apache Spark. - * - *
The Dataproc Metastore API defines the following resource model: - * - *
`/projects/{project_number}/locations/{location_id}/services/{service_id}`. - * - *
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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - * Service response = dataprocMetastoreClient.getService(name); - * } - * }- * - *
Note: close() needs to be called on the DataprocMetastoreClient object to clean up resources - * such as threads. In the example above, try-with-resources is used, which automatically calls - * close(). - * - *
The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *
See the individual methods for example code. - * - *
Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *
This class can be customized by passing in a custom instance of DataprocMetastoreSettings 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 - * DataprocMetastoreSettings dataprocMetastoreSettings = - * DataprocMetastoreSettings.newBuilder() - * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - * .build(); - * DataprocMetastoreClient dataprocMetastoreClient = - * DataprocMetastoreClient.create(dataprocMetastoreSettings); - * }- * - *
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 - * DataprocMetastoreSettings dataprocMetastoreSettings = - * DataprocMetastoreSettings.newBuilder().setEndpoint(myEndpoint).build(); - * DataprocMetastoreClient dataprocMetastoreClient = - * DataprocMetastoreClient.create(dataprocMetastoreSettings); - * }- * - *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * DataprocMetastoreSettings dataprocMetastoreSettings = - * DataprocMetastoreSettings.newHttpJsonBuilder().build(); - * DataprocMetastoreClient dataprocMetastoreClient = - * DataprocMetastoreClient.create(dataprocMetastoreSettings); - * }- * - *
Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class DataprocMetastoreClient implements BackgroundResource { - private final DataprocMetastoreSettings settings; - private final DataprocMetastoreStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of DataprocMetastoreClient with default settings. */ - public static final DataprocMetastoreClient create() throws IOException { - return create(DataprocMetastoreSettings.newBuilder().build()); - } - - /** - * Constructs an instance of DataprocMetastoreClient, 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 DataprocMetastoreClient create(DataprocMetastoreSettings settings) - throws IOException { - return new DataprocMetastoreClient(settings); - } - - /** - * Constructs an instance of DataprocMetastoreClient, using the given stub for making calls. This - * is for advanced usage - prefer using create(DataprocMetastoreSettings). - */ - public static final DataprocMetastoreClient create(DataprocMetastoreStub stub) { - return new DataprocMetastoreClient(stub); - } - - /** - * Constructs an instance of DataprocMetastoreClient, 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 DataprocMetastoreClient(DataprocMetastoreSettings settings) throws IOException { - this.settings = settings; - this.stub = ((DataprocMetastoreStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected DataprocMetastoreClient(DataprocMetastoreStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final DataprocMetastoreSettings getSettings() { - return settings; - } - - public DataprocMetastoreStub getStub() { - return stub; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - public final com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists services in a 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * for (Service element : dataprocMetastoreClient.listServices(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The relative resource name of the location of metastore services to - * list, in the following form: - *
`projects/{project_number}/locations/{location_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListServicesPagedResponse listServices(LocationName parent) { - ListServicesRequest request = - ListServicesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listServices(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists services in a 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - * for (Service element : dataprocMetastoreClient.listServices(parent).iterateAll()) { - * // doThingsWith(element); - * } - * } - * }- * - * @param parent Required. The relative resource name of the location of metastore services to - * list, in the following form: - *
`projects/{project_number}/locations/{location_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListServicesPagedResponse listServices(String parent) { - ListServicesRequest request = ListServicesRequest.newBuilder().setParent(parent).build(); - return listServices(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists services in a 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * ListServicesRequest request = - * ListServicesRequest.newBuilder() - * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .build(); - * for (Service element : dataprocMetastoreClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) { - return listServicesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists services in a 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * ListServicesRequest request = - * ListServicesRequest.newBuilder() - * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = - * dataprocMetastoreClient.listServicesPagedCallable().futureCall(request); - * // Do something. - * for (Service element : future.get().iterateAll()) { - * // doThingsWith(element); - * } - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * ListServicesRequest request = - * ListServicesRequest.newBuilder() - * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - * .setPageSize(883849137) - * .setPageToken("pageToken873572522") - * .setFilter("filter-1274492040") - * .setOrderBy("orderBy-1207110587") - * .build(); - * while (true) { - * ListServicesResponse response = - * dataprocMetastoreClient.listServicesCallable().call(request); - * for (Service element : response.getServicesList()) { - * // doThingsWith(element); - * } - * String nextPageToken = response.getNextPageToken(); - * if (!Strings.isNullOrEmpty(nextPageToken)) { - * request = request.toBuilder().setPageToken(nextPageToken).build(); - * } else { - * break; - * } - * } - * } - * }- */ - public final UnaryCallable
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]"); - * Service response = dataprocMetastoreClient.getService(name); - * } - * }- * - * @param name Required. The relative resource name of the metastore service to retrieve, in the - * following form: - *
`projects/{project_number}/locations/{location_id}/services/{service_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Service getService(ServiceName name) { - GetServiceRequest request = - GetServiceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getService(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single service. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString(); - * Service response = dataprocMetastoreClient.getService(name); - * } - * }- * - * @param name Required. The relative resource name of the metastore service to retrieve, in the - * following form: - *
`projects/{project_number}/locations/{location_id}/services/{service_id}`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Service getService(String name) { - GetServiceRequest request = GetServiceRequest.newBuilder().setName(name).build(); - return getService(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single service. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * GetServiceRequest request = - * GetServiceRequest.newBuilder() - * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - * .build(); - * Service response = dataprocMetastoreClient.getService(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 Service getService(GetServiceRequest request) { - return getServiceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the details of a single service. - * - *
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * GetServiceRequest request = - * GetServiceRequest.newBuilder() - * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString()) - * .build(); - * ApiFuture- */ - public final UnaryCallablefuture = dataprocMetastoreClient.getServiceCallable().futureCall(request); - * // Do something. - * Service response = future.get(); - * } - * }
Sample code: - * - *
{@code - * // This snippet has been automatically generated and should be regarded as a code template only. - * // It will require modifications to work: - * // - It may require correct/in-range values for request initialization. - * // - It may require specifying regional endpoints when creating the service client as shown in - * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) { - * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - * Service service = Service.newBuilder().build(); - * String serviceId = "serviceId-194185552"; - * Service response = - * dataprocMetastoreClient.createServiceAsync(parent, service, serviceId).get(); - * } - * }- * - * @param parent Required. The relative resource name of the location in which to create a - * metastore service, in the following form: - *
`projects/{project_number}/locations/{location_id}`. - * @param service Required. The Metastore service to create. The `name` field is ignored. The ID - * of the created metastore service must be provided in the request's `service_id` field. - * @param serviceId Required. The ID of the metastore service, which is used as the final - * component of the metastore service's name. - *
This value must be between 2 and 63 characters long inclusive, begin with a letter, end
- * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param service Required. The Metastore service to create. The `name` field is ignored. The ID
- * of the created metastore service must be provided in the request's `service_id` field.
- * @param serviceId Required. The ID of the metastore service, which is used as the final
- * component of the metastore service's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a letter, end
- * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The metastore service's `name` field is used to identify the metastore service to be
- * updated.
- * @param updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore service resource by the update. Fields specified in the `update_mask` are
- * relative to the resource (not to the full request). A field is overwritten if it is in the
- * mask.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListMetadataImportsPagedResponse listMetadataImports(ServiceName parent) {
- ListMetadataImportsRequest request =
- ListMetadataImportsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listMetadataImports(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists imports in a service.
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListMetadataImportsPagedResponse listMetadataImports(String parent) {
- ListMetadataImportsRequest request =
- ListMetadataImportsRequest.newBuilder().setParent(parent).build();
- return listMetadataImports(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists imports in a service.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MetadataImport getMetadataImport(MetadataImportName name) {
- GetMetadataImportRequest request =
- GetMetadataImportRequest.newBuilder()
- .setName(name == null ? null : name.toString())
- .build();
- return getMetadataImport(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single import.
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MetadataImport getMetadataImport(String name) {
- GetMetadataImportRequest request = GetMetadataImportRequest.newBuilder().setName(name).build();
- return getMetadataImport(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single import.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param metadataImport Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's `metadata_import_id`
- * field.
- * @param metadataImportId Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter, end with a
- * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param metadataImport Required. The metadata import to create. The `name` field is ignored. The
- * ID of the created metadata import must be provided in the request's `metadata_import_id`
- * field.
- * @param metadataImportId Required. The ID of the metadata import, which is used as the final
- * component of the metadata import's name.
- * This value must be between 1 and 64 characters long, begin with a letter, end with a
- * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The metadata import's `name` field is used to identify the metastore import to be
- * updated.
- * @param updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metadata import resource by the update. Fields specified in the `update_mask` are relative
- * to the resource (not to the full request). A field is overwritten if it is in the mask.
- * @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:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The relative resource name of the metastore service backup to restore
- * from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The relative resource name of the metastore service backup to restore
- * from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The relative resource name of the metastore service backup to restore
- * from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_id}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The relative resource name of the metastore service backup to restore
- * from, in the following form:
- * `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListBackupsPagedResponse listBackups(ServiceName parent) {
- ListBackupsRequest request =
- ListBackupsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listBackups(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists backups in a service.
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListBackupsPagedResponse listBackups(String parent) {
- ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
- return listBackups(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists backups in a service.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Backup getBackup(BackupName name) {
- GetBackupRequest request =
- GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getBackup(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single backup.
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Backup getBackup(String name) {
- GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
- return getBackup(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single backup.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @param backupId Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter, end with a
- * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}`.
- * @param backup Required. The backup to create. The `name` field is ignored. The ID of the
- * created backup must be provided in the request's `backup_id` field.
- * @param backupId Required. The ID of the backup, which is used as the final component of the
- * backup's name.
- * This value must be between 1 and 64 characters long, begin with a letter, end with a
- * letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The Dataproc Metastore Federation API defines the following resource model:
- *
- * 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 DataprocMetastoreFederationClient object to clean up
- * resources such as threads. In the example above, try-with-resources is used, which automatically
- * calls close().
- *
- * The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of
- * DataprocMetastoreFederationSettings to create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class DataprocMetastoreFederationClient implements BackgroundResource {
- private final DataprocMetastoreFederationSettings settings;
- private final DataprocMetastoreFederationStub stub;
- private final OperationsClient httpJsonOperationsClient;
- private final com.google.longrunning.OperationsClient operationsClient;
-
- /** Constructs an instance of DataprocMetastoreFederationClient with default settings. */
- public static final DataprocMetastoreFederationClient create() throws IOException {
- return create(DataprocMetastoreFederationSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of DataprocMetastoreFederationClient, 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 DataprocMetastoreFederationClient create(
- DataprocMetastoreFederationSettings settings) throws IOException {
- return new DataprocMetastoreFederationClient(settings);
- }
-
- /**
- * Constructs an instance of DataprocMetastoreFederationClient, using the given stub for making
- * calls. This is for advanced usage - prefer using create(DataprocMetastoreFederationSettings).
- */
- public static final DataprocMetastoreFederationClient create(
- DataprocMetastoreFederationStub stub) {
- return new DataprocMetastoreFederationClient(stub);
- }
-
- /**
- * Constructs an instance of DataprocMetastoreFederationClient, 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 DataprocMetastoreFederationClient(DataprocMetastoreFederationSettings settings)
- throws IOException {
- this.settings = settings;
- this.stub = ((DataprocMetastoreFederationStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected DataprocMetastoreFederationClient(DataprocMetastoreFederationStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- public final DataprocMetastoreFederationSettings getSettings() {
- return settings;
- }
-
- public DataprocMetastoreFederationStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists federations in a project and location.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Federation getFederation(FederationName name) {
- GetFederationRequest request =
- GetFederationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getFederation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the details of a single federation.
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Federation getFederation(String name) {
- GetFederationRequest request = GetFederationRequest.newBuilder().setName(name).build();
- return getFederation(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the details of a single federation.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param federation Required. The Metastore Federation to create. The `name` field is ignored.
- * The ID of the created metastore federation must be provided in the request's
- * `federation_id` field.
- * @param federationId Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a letter, end
- * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}`.
- * @param federation Required. The Metastore Federation to create. The `name` field is ignored.
- * The ID of the created metastore federation must be provided in the request's
- * `federation_id` field.
- * @param federationId Required. The ID of the metastore federation, which is used as the final
- * component of the metastore federation's name.
- * This value must be between 2 and 63 characters long inclusive, begin with a letter, end
- * with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The metastore federation's `name` field is used to identify the metastore service to be
- * updated.
- * @param updateMask Required. A field mask used to specify the fields to be overwritten in the
- * metastore federation resource by the update. Fields specified in the `update_mask` are
- * relative to the resource (not to the full request). A field is overwritten if it is in the
- * mask.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * `projects/{project_number}/locations/{location_id}/federations/{federation_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the total timeout of getFederation to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the total timeout of getService to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class is for advanced usage and reflects the underlying API directly.
- */
-@Generated("by gapic-generator-java")
-public abstract class DataprocMetastoreFederationStub implements BackgroundResource {
-
- public OperationsStub getOperationsStub() {
- return null;
- }
-
- public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
- return null;
- }
-
- public UnaryCallable The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the total timeout of getFederation to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * Service service = Service.newBuilder().build();
- * String serviceId = "serviceId-194185552";
- * Service response =
- * dataprocMetastoreClient.createServiceAsync(parent, service, serviceId).get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the location in which to create a
- * metastore service, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateServiceRequest request =
- * CreateServiceRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setServiceId("serviceId-194185552")
- * .setService(Service.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Service response = dataprocMetastoreClient.createServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateServiceRequest request =
- * CreateServiceRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setServiceId("serviceId-194185552")
- * .setService(Service.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateServiceRequest request =
- * CreateServiceRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setServiceId("serviceId-194185552")
- * .setService(Service.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * Service service = Service.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Service response = dataprocMetastoreClient.updateServiceAsync(service, updateMask).get();
- * }
- * }
- *
- * @param service Required. The metastore service to update. The server only merges fields in the
- * service if they are specified in `update_mask`.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateServiceRequest request =
- * UpdateServiceRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setService(Service.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Service response = dataprocMetastoreClient.updateServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateServiceRequest request =
- * UpdateServiceRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setService(Service.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateServiceRequest request =
- * UpdateServiceRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setService(Service.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * dataprocMetastoreClient.deleteServiceAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore service to delete, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String name = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * dataprocMetastoreClient.deleteServiceAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore service to delete, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteServiceRequest request =
- * DeleteServiceRequest.newBuilder()
- * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setRequestId("requestId693933066")
- * .build();
- * dataprocMetastoreClient.deleteServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteServiceRequest request =
- * DeleteServiceRequest.newBuilder()
- * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteServiceRequest request =
- * DeleteServiceRequest.newBuilder()
- * .setName(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * for (MetadataImport element :
- * dataprocMetastoreClient.listMetadataImports(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service whose metadata imports to
- * list, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * for (MetadataImport element :
- * dataprocMetastoreClient.listMetadataImports(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service whose metadata imports to
- * list, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListMetadataImportsRequest request =
- * ListMetadataImportsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (MetadataImport element :
- * dataprocMetastoreClient.listMetadataImports(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 ListMetadataImportsPagedResponse listMetadataImports(
- ListMetadataImportsRequest request) {
- return listMetadataImportsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists imports in a service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListMetadataImportsRequest request =
- * ListMetadataImportsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListMetadataImportsRequest request =
- * ListMetadataImportsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * while (true) {
- * ListMetadataImportsResponse response =
- * dataprocMetastoreClient.listMetadataImportsCallable().call(request);
- * for (MetadataImport element : response.getMetadataImportsList()) {
- * // 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * MetadataImportName name =
- * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]");
- * MetadataImport response = dataprocMetastoreClient.getMetadataImport(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the metadata import to retrieve, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String name =
- * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
- * .toString();
- * MetadataImport response = dataprocMetastoreClient.getMetadataImport(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the metadata import to retrieve, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * GetMetadataImportRequest request =
- * GetMetadataImportRequest.newBuilder()
- * .setName(
- * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
- * .toString())
- * .build();
- * MetadataImport response = dataprocMetastoreClient.getMetadataImport(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 MetadataImport getMetadataImport(GetMetadataImportRequest request) {
- return getMetadataImportCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single import.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * GetMetadataImportRequest request =
- * GetMetadataImportRequest.newBuilder()
- * .setName(
- * MetadataImportName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[METADATA_IMPORT]")
- * .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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * MetadataImport metadataImport = MetadataImport.newBuilder().build();
- * String metadataImportId = "metadataImportId1824548847";
- * MetadataImport response =
- * dataprocMetastoreClient
- * .createMetadataImportAsync(parent, metadataImport, metadataImportId)
- * .get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * MetadataImport metadataImport = MetadataImport.newBuilder().build();
- * String metadataImportId = "metadataImportId1824548847";
- * MetadataImport response =
- * dataprocMetastoreClient
- * .createMetadataImportAsync(parent, metadataImport, metadataImportId)
- * .get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service in which to create a
- * metastore import, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateMetadataImportRequest request =
- * CreateMetadataImportRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setMetadataImportId("metadataImportId1824548847")
- * .setMetadataImport(MetadataImport.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * MetadataImport response = dataprocMetastoreClient.createMetadataImportAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateMetadataImportRequest request =
- * CreateMetadataImportRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setMetadataImportId("metadataImportId1824548847")
- * .setMetadataImport(MetadataImport.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateMetadataImportRequest request =
- * CreateMetadataImportRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setMetadataImportId("metadataImportId1824548847")
- * .setMetadataImport(MetadataImport.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * MetadataImport metadataImport = MetadataImport.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * MetadataImport response =
- * dataprocMetastoreClient.updateMetadataImportAsync(metadataImport, updateMask).get();
- * }
- * }
- *
- * @param metadataImport Required. The metadata import to update. The server only merges fields in
- * the import if they are specified in `update_mask`.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateMetadataImportRequest request =
- * UpdateMetadataImportRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setMetadataImport(MetadataImport.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * MetadataImport response = dataprocMetastoreClient.updateMetadataImportAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateMetadataImportRequest request =
- * UpdateMetadataImportRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setMetadataImport(MetadataImport.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * UpdateMetadataImportRequest request =
- * UpdateMetadataImportRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setMetadataImport(MetadataImport.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ExportMetadataRequest request =
- * ExportMetadataRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setRequestId("requestId693933066")
- * .build();
- * MetadataExport response = dataprocMetastoreClient.exportMetadataAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ExportMetadataRequest request =
- * ExportMetadataRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ExportMetadataRequest request =
- * ExportMetadataRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
- * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
- * }
- * }
- *
- * @param service Required. The relative resource name of the metastore service to run restore, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * String backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
- * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
- * }
- * }
- *
- * @param service Required. The relative resource name of the metastore service to run restore, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * BackupName backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
- * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
- * }
- * }
- *
- * @param service Required. The relative resource name of the metastore service to run restore, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String service = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * String backup = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
- * Restore response = dataprocMetastoreClient.restoreServiceAsync(service, backup).get();
- * }
- * }
- *
- * @param service Required. The relative resource name of the metastore service to run restore, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * RestoreServiceRequest request =
- * RestoreServiceRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackup(
- * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
- * .setRequestId("requestId693933066")
- * .build();
- * Restore response = dataprocMetastoreClient.restoreServiceAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * RestoreServiceRequest request =
- * RestoreServiceRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackup(
- * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * RestoreServiceRequest request =
- * RestoreServiceRequest.newBuilder()
- * .setService(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackup(
- * BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * for (Backup element : dataprocMetastoreClient.listBackups(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service whose backups to list, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * for (Backup element : dataprocMetastoreClient.listBackups(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service whose backups to list, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (Backup element : dataprocMetastoreClient.listBackups(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 ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
- return listBackupsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists backups in a service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ListBackupsRequest request =
- * ListBackupsRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * while (true) {
- * ListBackupsResponse response = dataprocMetastoreClient.listBackupsCallable().call(request);
- * for (Backup element : response.getBackupsList()) {
- * // 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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
- * Backup response = dataprocMetastoreClient.getBackup(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the backup to retrieve, in the following
- * form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
- * Backup response = dataprocMetastoreClient.getBackup(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the backup to retrieve, in the following
- * form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
- * .build();
- * Backup response = dataprocMetastoreClient.getBackup(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 Backup getBackup(GetBackupRequest request) {
- return getBackupCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets details of a single backup.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * GetBackupRequest request =
- * GetBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * ServiceName parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]");
- * Backup backup = Backup.newBuilder().build();
- * String backupId = "backupId2121930365";
- * Backup response = dataprocMetastoreClient.createBackupAsync(parent, backup, backupId).get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service in which to create a backup
- * of the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String parent = ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString();
- * Backup backup = Backup.newBuilder().build();
- * String backupId = "backupId2121930365";
- * Backup response = dataprocMetastoreClient.createBackupAsync(parent, backup, backupId).get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the service in which to create a backup
- * of the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateBackupRequest request =
- * CreateBackupRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackupId("backupId2121930365")
- * .setBackup(Backup.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Backup response = dataprocMetastoreClient.createBackupAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateBackupRequest request =
- * CreateBackupRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackupId("backupId2121930365")
- * .setBackup(Backup.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * CreateBackupRequest request =
- * CreateBackupRequest.newBuilder()
- * .setParent(ServiceName.of("[PROJECT]", "[LOCATION]", "[SERVICE]").toString())
- * .setBackupId("backupId2121930365")
- * .setBackup(Backup.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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]");
- * dataprocMetastoreClient.deleteBackupAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the backup to delete, in the following
- * form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * String name = BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString();
- * dataprocMetastoreClient.deleteBackupAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the backup to delete, in the following
- * form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteBackupRequest request =
- * DeleteBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").toString())
- * .setRequestId("requestId693933066")
- * .build();
- * dataprocMetastoreClient.deleteBackupAsync(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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteBackupRequest request =
- * DeleteBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").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 (DataprocMetastoreClient dataprocMetastoreClient = DataprocMetastoreClient.create()) {
- * DeleteBackupRequest request =
- * DeleteBackupRequest.newBuilder()
- * .setName(BackupName.of("[PROJECT]", "[LOCATION]", "[SERVICE]", "[BACKUP]").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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- * Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- * DataprocMetastoreFederationSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- * DataprocMetastoreFederationSettings.newBuilder().setEndpoint(myEndpoint).build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- * DataprocMetastoreFederationSettings.newHttpJsonBuilder().build();
- * DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create(dataprocMetastoreFederationSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (Federation element :
- * dataprocMetastoreFederationClient.listFederations(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the location of metastore federations to
- * list, in the following form: `projects/{project_number}/locations/{location_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListFederationsPagedResponse listFederations(LocationName parent) {
- ListFederationsRequest request =
- ListFederationsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listFederations(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists federations in a 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Federation element :
- * dataprocMetastoreFederationClient.listFederations(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The relative resource name of the location of metastore federations to
- * list, in the following form: `projects/{project_number}/locations/{location_id}`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListFederationsPagedResponse listFederations(String parent) {
- ListFederationsRequest request = ListFederationsRequest.newBuilder().setParent(parent).build();
- return listFederations(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists federations in a 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * ListFederationsRequest request =
- * ListFederationsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (Federation element :
- * dataprocMetastoreFederationClient.listFederations(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 ListFederationsPagedResponse listFederations(ListFederationsRequest request) {
- return listFederationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists federations in a 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * ListFederationsRequest request =
- * ListFederationsRequest.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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * ListFederationsRequest request =
- * ListFederationsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setFilter("filter-1274492040")
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * while (true) {
- * ListFederationsResponse response =
- * dataprocMetastoreFederationClient.listFederationsCallable().call(request);
- * for (Federation element : response.getFederationsList()) {
- * // 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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- * Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore federation to retrieve, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * String name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString();
- * Federation response = dataprocMetastoreFederationClient.getFederation(name);
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore federation to retrieve, in
- * the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * GetFederationRequest request =
- * GetFederationRequest.newBuilder()
- * .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
- * .build();
- * Federation response = dataprocMetastoreFederationClient.getFederation(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 Federation getFederation(GetFederationRequest request) {
- return getFederationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the details of a single federation.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * GetFederationRequest request =
- * GetFederationRequest.newBuilder()
- * .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * Federation federation = Federation.newBuilder().build();
- * String federationId = "federationId-735921218";
- * Federation response =
- * dataprocMetastoreFederationClient
- * .createFederationAsync(parent, federation, federationId)
- * .get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * Federation federation = Federation.newBuilder().build();
- * String federationId = "federationId-735921218";
- * Federation response =
- * dataprocMetastoreFederationClient
- * .createFederationAsync(parent, federation, federationId)
- * .get();
- * }
- * }
- *
- * @param parent Required. The relative resource name of the location in which to create a
- * federation service, in the following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * CreateFederationRequest request =
- * CreateFederationRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFederationId("federationId-735921218")
- * .setFederation(Federation.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Federation response = dataprocMetastoreFederationClient.createFederationAsync(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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * CreateFederationRequest request =
- * CreateFederationRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFederationId("federationId-735921218")
- * .setFederation(Federation.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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * CreateFederationRequest request =
- * CreateFederationRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFederationId("federationId-735921218")
- * .setFederation(Federation.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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * Federation federation = Federation.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Federation response =
- * dataprocMetastoreFederationClient.updateFederationAsync(federation, updateMask).get();
- * }
- * }
- *
- * @param federation Required. The metastore federation to update. The server only merges fields
- * in the service if they are specified in `update_mask`.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * UpdateFederationRequest request =
- * UpdateFederationRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setFederation(Federation.newBuilder().build())
- * .setRequestId("requestId693933066")
- * .build();
- * Federation response = dataprocMetastoreFederationClient.updateFederationAsync(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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * UpdateFederationRequest request =
- * UpdateFederationRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setFederation(Federation.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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * UpdateFederationRequest request =
- * UpdateFederationRequest.newBuilder()
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .setFederation(Federation.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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * FederationName name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]");
- * dataprocMetastoreFederationClient.deleteFederationAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore federation to delete, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * String name = FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString();
- * dataprocMetastoreFederationClient.deleteFederationAsync(name).get();
- * }
- * }
- *
- * @param name Required. The relative resource name of the metastore federation to delete, in the
- * following form:
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * DeleteFederationRequest request =
- * DeleteFederationRequest.newBuilder()
- * .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").toString())
- * .setRequestId("requestId693933066")
- * .build();
- * dataprocMetastoreFederationClient.deleteFederationAsync(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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * DeleteFederationRequest request =
- * DeleteFederationRequest.newBuilder()
- * .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").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 (DataprocMetastoreFederationClient dataprocMetastoreFederationClient =
- * DataprocMetastoreFederationClient.create()) {
- * DeleteFederationRequest request =
- * DeleteFederationRequest.newBuilder()
- * .setName(FederationName.of("[PROJECT]", "[LOCATION]", "[FEDERATION]").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
- * DataprocMetastoreFederationSettings.Builder dataprocMetastoreFederationSettingsBuilder =
- * DataprocMetastoreFederationSettings.newBuilder();
- * dataprocMetastoreFederationSettingsBuilder
- * .getFederationSettings()
- * .setRetrySettings(
- * dataprocMetastoreFederationSettingsBuilder
- * .getFederationSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * DataprocMetastoreFederationSettings dataprocMetastoreFederationSettings =
- * dataprocMetastoreFederationSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class DataprocMetastoreFederationSettings
- extends ClientSettings
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreSettings.Builder dataprocMetastoreSettingsBuilder =
- * DataprocMetastoreSettings.newBuilder();
- * dataprocMetastoreSettingsBuilder
- * .getServiceSettings()
- * .setRetrySettings(
- * dataprocMetastoreSettingsBuilder
- * .getServiceSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * DataprocMetastoreSettings dataprocMetastoreSettings = dataprocMetastoreSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class DataprocMetastoreSettings extends ClientSettings
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * DataprocMetastoreFederationStubSettings.Builder dataprocMetastoreFederationSettingsBuilder =
- * DataprocMetastoreFederationStubSettings.newBuilder();
- * dataprocMetastoreFederationSettingsBuilder
- * .getFederationSettings()
- * .setRetrySettings(
- * dataprocMetastoreFederationSettingsBuilder
- * .getFederationSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
- * .build());
- * DataprocMetastoreFederationStubSettings dataprocMetastoreFederationSettings =
- * dataprocMetastoreFederationSettingsBuilder.build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class DataprocMetastoreFederationStubSettings
- extends StubSettings